def test_bohb(cs, n_id): bohb = BOHB(cs, train, maximal_iter, num_iter=iter_num, p=0.2, n_workers=n_work) bohb.run() bohb.plot_statistics(method="BOHB-cnn-%d" % n_id) result = bohb.get_incumbent(5) print(result) return result
def test_bohb(cs, id): bohb = BOHB(cs, train, maximal_iter, num_iter=iter_num, p=0.2, n_workers=n_work) bohb.method_name = "BOHB-fcnet-%d" % id bohb.runtime_limit = runtime_limit bohb.run() bohb.plot_statistics(method="BOHB-fcnet-%d" % id) print(bohb.get_incumbent(5)) return bohb.get_incumbent(5)
def test_bohb(cs, id): method_id = "BOHB-resnet-%d" % id bohb = BOHB(cs, train, maximal_iter, num_iter=iter_num, p=0.2, n_workers=n_work) bohb.restart_needed = True bohb.runtime_limit = args.b bohb.run() bohb.plot_statistics(method=method_id) result = bohb.get_incumbent(5) save_result(method_id, result) return result
def test_bohb(cs, id): bohb = BOHB(cs, train, maximal_iter, num_iter=iter_num, p=0.2, n_workers=n_work) bohb.run() bohb.plot_statistics(method="BOHB-rnn-%d" % id) print(bohb.get_incumbent(5)) return bohb.get_incumbent(5)
def test_methods_mean_variance(cs): iterations = args.iter_c for i in range(1, 1 + iterations): weight = [1.0, 0.5, 0.25, 0.125, 0.125] bo = SMAC(cs, train, maximal_iter, num_iter=iter_num, n_workers=n_work) bo.run() bo.plot_statistics(method="BO-lenet-%d" % i) hyperband = Hyperband(cs, train, maximal_iter, num_iter=iter_num, n_workers=n_work) hyperband.set_restart() hyperband.run() hyperband.plot_statistics(method="HB-lenet-%d" % i) bohb = BOHB(cs, train, maximal_iter, num_iter=iter_num, p=0.2, n_workers=n_work) bohb.set_restart() bohb.run() bohb.plot_statistics(method="BOHB-lenet-%d" % i) xfhb = XFHB(cs, train, maximal_iter, num_iter=iter_num, n_workers=n_work, info_type='Weighted', init_weight=weight, random_mode=False) xfhb.set_restart() xfhb.run() xfhb.plot_statistics(method="XFHB-lenet-disable_w-%d" % i) xfhb = XFHB(cs, train, maximal_iter, num_iter=iter_num, n_workers=n_work, info_type='Weighted', update_enable=True, update_delta=1, init_weight=weight, random_mode=False) xfhb.set_restart() xfhb.run() xfhb.plot_statistics(method="XFHB-lenet-update_w-%d" % i)
def test_bohb(cs, id): model = BOHB(cs, train, maximal_iter, num_iter=iter_num, p=0.2, n_workers=n_work) model.method_name = "BOHB-xgb-%d" % id model.runtime_limit = runtime_limit model.restart_needed = True model.run() result = model.get_incumbent(5) print(model.incumbent_configs) print(result) return result
def test_update_rule(cs): iterations = args.iter_c for i in range(1, 1 + iterations): high_start_w = [1.0, 0.9, 0.72, 0.504, 0.3024, 0.1512] low_start_w = [1.0, 0.6, 0.5, 0.4, 0.4] weight = [1.0, 0.5, 0.25, 0.125, 0.125] zero_start = [0.0, 0.0, 0.0, 0.0, 0.0] xfhb = XFHB(cs, train, maximal_iter, num_iter=iter_num, n_workers=n_work, info_type='Weighted', update_enable=True, update_delta=1, init_weight=weight, random_mode=False) xfhb.set_restart() xfhb.run() xfhb.plot_statistics(method="XFHB-lenet-update_w_random_f-%d" % i) xfhb = XFHB(cs, train, maximal_iter, num_iter=iter_num, n_workers=n_work, info_type='Weighted', update_enable=True, update_delta=1, init_weight=weight, random_mode=True) xfhb.set_restart() xfhb.run() xfhb.plot_statistics(method="XFHB-lenet-update_w_random_t-%d" % i) xfhb = XFHB(cs, train, maximal_iter, num_iter=iter_num, n_workers=n_work, info_type='Weighted', init_weight=weight) xfhb.set_restart() xfhb.run() xfhb.plot_statistics(method="XFHB-lenet-not_update_w-%d" % i) hyperband = Hyperband(cs, train, maximal_iter, num_iter=iter_num, n_workers=n_work) hyperband.set_restart() hyperband.run() hyperband.plot_statistics(method="HB-lenet-new-%d" % i) bohb = BOHB(cs, train, maximal_iter, num_iter=iter_num, p=0.2, n_workers=n_work) bohb.set_restart() bohb.run() bohb.plot_statistics(method="BOHB-lenet-new-%d" % i)