y_names = ["f1", "f2"] data = pd.DataFrame(np.hstack((x, y.objectives)), columns=x_names + y_names) problem = DataProblem(data=data, variable_names=x_names, objective_names=y_names) problem.train(LipschitzianRegressor) evolver_L_opt = oRVEA(problem, use_surrogates=True) while evolver_L_opt.continue_evolution(): evolver_L_opt.iterate() evolver_L = RVEA(problem, use_surrogates=True) while evolver_L.continue_evolution(): evolver_L.iterate() evolver_L_robust = robust_RVEA(problem, use_surrogates=True) while evolver_L_robust.continue_evolution(): evolver_L_robust.iterate() problem.train(GaussianProcessRegressor) evolver_G_opt = oRVEA(problem, use_surrogates=True) while evolver_G_opt.continue_evolution(): evolver_G_opt.iterate() evolver_G = RVEA(problem, use_surrogates=True) while evolver_G.continue_evolution(): evolver_G.iterate()
from desdeo_problem.testproblems.TestProblems import test_problem_builder from desdeo_emo.EAs.RVEA import RVEA from desdeo_emo.EAs.NSGAIII import NSGAIII from desdeo_emo.othertools.plotlyanimate import animate_init_, animate_next_ dtlz3 = test_problem_builder("DTLZ3", n_of_variables=12, n_of_objectives=11) evolver = RVEA(dtlz3, n_iterations=10) figure = animate_init_(evolver.population.objectives, filename="dtlz3.html") while evolver.continue_evolution(): evolver.iterate() figure = animate_next_( evolver.population.objectives, figure, filename="dtlz3.html", generation=evolver._iteration_counter, )