From 0823035fe0ff338fcee955c04106e8b3bdc22195 Mon Sep 17 00:00:00 2001 From: Alexandre Abraham Date: Thu, 30 Apr 2020 19:24:47 +0200 Subject: [PATCH] Fix the Hyperband configuration formula The formula has an additional rounding operation that makes the result deviate from the original paper formula. --- hpbandster/optimizers/hyperband.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hpbandster/optimizers/hyperband.py b/hpbandster/optimizers/hyperband.py index 679f0f1..e742ed2 100644 --- a/hpbandster/optimizers/hyperband.py +++ b/hpbandster/optimizers/hyperband.py @@ -89,7 +89,7 @@ def get_next_iteration(self, iteration, iteration_kwargs={}): # number of 'SH rungs' s = self.max_SH_iter - 1 - (iteration%self.max_SH_iter) # number of configurations in that bracket - n0 = int(np.floor((self.max_SH_iter)/(s+1)) * self.eta**s) + n0 = int((self.max_SH_iter)/(s+1) * self.eta**s) ns = [max(int(n0*(self.eta**(-i))), 1) for i in range(s+1)] return(SuccessiveHalving(HPB_iter=iteration, num_configs=ns, budgets=self.budgets[(-s-1):], config_sampler=self.config_generator.get_config, **iteration_kwargs))