(self, budget)
return sample.get_dictionary(), {}
Function to sample a new configuration

			This function is called inside Hyperband to query a new configuration


			Parameters:
			-----------
			budget: float
				the budget for which this configuration is scheduled

			returns: config
				should return a valid configuration
Function to sample a new configuration
Function to sample a new configuration
def get_config(self, budget):
		"""
			Function to sample a new configuration

			This function is called inside Hyperband to query a new configuration


			Parameters:
			-----------
			budget: float
				the budget for which this configuration is scheduled

			returns: config
				should return a valid configuration

		"""
		# No observations available for this budget sample from the prior
		if len(self.kde_models.keys()) == 0:
			return self.configspace.sample_configuration().get_dictionary()
		# If we haven't seen anything with this budget, we sample from the kde trained on the highest budget
		if budget not in self.kde_models.keys():
			budget = sorted(self.kde_models.keys())[-1]
		# TODO: This only works in continuous space and with gaussian kernels
		kde = self.kde_models[budget]
		idx = np.random.randint(0, len(self.kde_models[budget].data))

		vector = [sps.truncnorm.rvs(-m/bw,(1-m)/bw, loc=m, scale=bw) for m,bw in zip(self.kde_models[budget].data[idx], kde.bw)]
		
		if np.any(np.array(vector)>1) or np.any(np.array(vector)<0):
			raise RuntimeError("truncated normal sampling problems!")
		
		sample = ConfigSpace.Configuration(self.configspace, vector=vector)
		return sample.get_dictionary(), {}
def get_config ( self , budget ) : # No observations available for this budget sample from the prior if len ( self . kde_models . keys ( ) ) == 0 : return self . configspace . sample_configuration ( ) . get_dictionary ( ) # If we haven't seen anything with this budget, we sample from the kde trained on the highest budget if budget not in self . kde_models . keys ( ) : budget = sorted ( self . kde_models . keys ( ) ) [ - 1 ] # TODO: This only works in continuous space and with gaussian kernels kde = self . kde_models [ budget ] idx = np . random . randint ( 0 , len ( self . kde_models [ budget ] . data ) ) vector = [ sps . truncnorm . rvs ( - m / bw , ( 1 - m ) / bw , loc = m , scale = bw ) for m , bw in zip ( self . kde_models [ budget ] . data [ idx ] , kde . bw ) ] if np . any ( np . array ( vector ) > 1 ) or np . any ( np . array ( vector ) < 0 ) : raise RuntimeError ( "truncated normal sampling problems!" ) sample = ConfigSpace . Configuration ( self . configspace , vector = vector ) return sample . get_dictionary ( ) , { }