def MOEAD(AllSet, TrainSet, TestSet): best_config, ngen = moead_estimate(NP=4, NGEN=250, data=TrainSet) mre, sa, ci = calc_error1(best_config, TestSet, f(AllSet)) return {"mre": mre, "sa": sa, "config": best_config, "gen": ngen}
def NSGA2(AllSet, TrainSet, TestSet): best_config, ngen = nsga2_estimate(NP=100, NGEN=250, data=TrainSet) mre, sa, ci = calc_error1(best_config, TestSet, f(AllSet)) return {"mre": mre, "sa": sa, "config": best_config, "gen": ngen}
def ABE0(AllSet, TrainSet, TestSet): best_config = [0, 0, 0, 0, 0, 0] mre, sa, ci = calc_error1(best_config, TestSet, f(AllSet)) return {"mre": mre, "sa": sa, "config": best_config}
def DE10(AllSet, TrainSet, TestSet): best_config, ngen = de_estimate(10, 250, data=TrainSet) mre, sa, ci = calc_error1(best_config, TestSet, f(AllSet)) return {"mre": mre, "sa": sa, "config": best_config, "gen": ngen}
def RANDOM30(AllSet, TrainSet, TestSet): best_config = random_strategy(30, data=TrainSet) mre, sa, ci = calc_error1(best_config, TestSet, f(AllSet)) return {"mre": mre, "sa": sa, "config": best_config}