docstr: 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.
  update_after_n_points: int
          Specifies after how many new observed points the kernel density will be retrained.
  min_points_in_model: int
          minimum number of datapoints needed to fit a model
code: def __init__(
      self,
      configspace,
      top_n_percent=10,
      update_after_n_points=50,
      min_points_in_model=None,
      *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.
      update_after_n_points: int
              Specifies after how many new observed points the kernel density will be retrained.
      min_points_in_model: int
              minimum number of datapoints needed to fit a model
  
      """
      super(KernelDensityEstimator, self).__init__(**kwargs)
  
      self.top_n_percent = top_n_percent
      self.update_after_n_points = update_after_n_points
      self.configspace = configspace
  
      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
          )
  
      # TODO: so far we only consider continuous configuration spaces
      self.var_type = "c" * len(self.configspace.get_hyperparameters())
      self.configs = dict()
      self.losses = dict()
      self.kde_models = dict()
  
file_path: auptimizer/src/aup/Proposer/hpbandster/optimizers/config_generators/kde.py
imports: import ConfigSpace
  import numpy
  import scipy.stats
  import statsmodels.api
  from hpbandster.config_generators.base import base_config_generator
label_desc: Use image node_id 1 to create a new KernelDensityEstimator object from inherited base classes: base_config_generator with example: obj = KernelDensityEstimator(configspace, top_n_percent, update_after_n_points, min_points_in_model)