(self, configspace, min_points_in_model = None,
				 top_n_percent=15, num_samples = 64, random_fraction=1/3,
				 bandwidth_factor=3, min_bandwidth=1e-3,
				**kwargs)
Fits for each given budget a kernel density estimator on the best N percent of the
			evaluated configurations on this budget.


			Parameters:
			-----------
			configspace: ConfigSpace
				Configuration space object
			top_n_percent: int
				Determines the percentile of configurations that will be used as training data
				for the kernel density estimator, e.g if set to 10 the 10% best configurations will be considered
				for training.
			min_points_in_model: int
				minimum number of datapoints needed to fit a model
			num_samples: int
				number of samples drawn to optimize EI via sampling
			random_fraction: float
				fraction of random configurations returned
			bandwidth_factor: float
				widens the bandwidth for contiuous parameters for proposed points to optimize EI
			min_bandwidth: float
				to keep diversity, even when all (good) samples have the same value for one of the parameters,
				a minimum bandwidth (Default: 1e-3) is used instead of zero.
Fits for each given budget a kernel density estimator on the best N percent of the
			evaluated configurations on this budget.
Fits for each given budget a kernel density estimator on the best N percent of the evaluated configurations on this budget .
def __init__(self, configspace, min_points_in_model = None,
				 top_n_percent=15, num_samples = 64, random_fraction=1/3,
				 bandwidth_factor=3, min_bandwidth=1e-3,
				**kwargs):
		"""
			Fits for each given budget a kernel density estimator on the best N percent of the
			evaluated configurations on this budget.


			Parameters:
			-----------
			configspace: ConfigSpace
				Configuration space object
			top_n_percent: int
				Determines the percentile of configurations that will be used as training data
				for the kernel density estimator, e.g if set to 10 the 10% best configurations will be considered
				for training.
			min_points_in_model: int
				minimum number of datapoints needed to fit a model
			num_samples: int
				number of samples drawn to optimize EI via sampling
			random_fraction: float
				fraction of random configurations returned
			bandwidth_factor: float
				widens the bandwidth for contiuous parameters for proposed points to optimize EI
			min_bandwidth: float
				to keep diversity, even when all (good) samples have the same value for one of the parameters,
				a minimum bandwidth (Default: 1e-3) is used instead of zero. 

		"""
		super().__init__(**kwargs)
		self.top_n_percent=top_n_percent
		self.configspace = configspace
		self.bw_factor = bandwidth_factor
		self.min_bandwidth = min_bandwidth

		self.min_points_in_model = min_points_in_model
		if min_points_in_model is None:
			self.min_points_in_model = len(self.configspace.get_hyperparameters())+1
		
		if self.min_points_in_model < len(self.configspace.get_hyperparameters())+1:
			self.logger.warning('Invalid min_points_in_model value. Setting it to %i'%(len(self.configspace.get_hyperparameters())+1))
			self.min_points_in_model =len(self.configspace.get_hyperparameters())+1
		
		self.num_samples = num_samples
		self.random_fraction = random_fraction

		hps = self.configspace.get_hyperparameters()

		self.kde_vartypes = ""
		self.vartypes = []


		for h in hps:
			if hasattr(h, 'sequence'):
				raise RuntimeError('This version on BOHB does not support ordinal hyperparameters. Please encode %s as an integer parameter!'%(h.name))
			
			if hasattr(h, 'choices'):
				self.kde_vartypes += 'u'
				self.vartypes +=[ len(h.choices)]
			else:
				self.kde_vartypes += 'c'
				self.vartypes +=[0]
		
		self.vartypes = np.array(self.vartypes, dtype=int)

		# store precomputed probs for the categorical parameters
		self.cat_probs = []
		

		self.configs = dict()
		self.losses = dict()
		self.good_config_rankings = dict()
		self.kde_models = dict()
def __init__ ( self , configspace , min_points_in_model = None , top_n_percent = 15 , num_samples = 64 , random_fraction = 1 / 3 , bandwidth_factor = 3 , min_bandwidth = 1e-3 , * * kwargs ) : super ( ) . __init__ ( * * kwargs ) self . top_n_percent = top_n_percent self . configspace = configspace self . bw_factor = bandwidth_factor self . min_bandwidth = min_bandwidth self . min_points_in_model = min_points_in_model if min_points_in_model is None : self . min_points_in_model = len ( self . configspace . get_hyperparameters ( ) ) + 1 if self . min_points_in_model < len ( self . configspace . get_hyperparameters ( ) ) + 1 : self . logger . warning ( 'Invalid min_points_in_model value. Setting it to %i' % ( len ( self . configspace . get_hyperparameters ( ) ) + 1 ) ) self . min_points_in_model = len ( self . configspace . get_hyperparameters ( ) ) + 1 self . num_samples = num_samples self . random_fraction = random_fraction hps = self . configspace . get_hyperparameters ( ) self . kde_vartypes = "" self . vartypes = [ ] for h in hps : if hasattr ( h , 'sequence' ) : raise RuntimeError ( 'This version on BOHB does not support ordinal hyperparameters. Please encode %s as an integer parameter!' % ( h . name ) ) if hasattr ( h , 'choices' ) : self . kde_vartypes += 'u' self . vartypes += [ len ( h . choices ) ] else : self . kde_vartypes += 'c' self . vartypes += [ 0 ] self . vartypes = np . array ( self . vartypes , dtype = int ) # store precomputed probs for the categorical parameters self . cat_probs = [ ] self . configs = dict ( ) self . losses = dict ( ) self . good_config_rankings = dict ( ) self . kde_models = dict ( )