aixd.sampler.sampler_definitions.sampler_bayesian_kde
- aixd.sampler.sampler_definitions.sampler_bayesian_kde(dobjects: List[DataObject], engine: SamplingEngine, objective: Operator, condition: Operator | None = None, data: DataFrame | array | None = None, callbacks_class: SamplingCallback | None = None) SamplesGenerator [source]
A KDE fitted to some data, and then sampling optimizing for some objective. This process is slower than a KDE sampler with a condition.
- Parameters:
dobjects (List[DataObject]) – List of DataObjects to sample from
engine (SamplingEngine) – To use for sampling
objective (Operator) – Objective operator to measure the performance of the obtained samples, in order to update the strategy of the sampler. Used in the Bayesian case.
condition (Operator) – The condition the samples need to satisfy
data (Union[pd.DataFrame, np.array]) – Just a quantile strategy for sampler that is fitted to some data, in order to provide samples that follow, in an univariate fashion, the distribution of the data.
callbacks_class (SamplingCallback) – In case we want to run some function on the samples obtained in the sampling process. This is intended for advanced usage.
- Returns:
sampler (SamplesGenerator) – The sampler object