smac.model.gaussian_process.mcmc_gaussian_process

Classes

MCMCGaussianProcess(configspace, kernel[, ...])

Implementation of a Gaussian process model which out-integrates its hyperparameters by Markow-Chain-Monte-Carlo (MCMC).

Interfaces

class smac.model.gaussian_process.mcmc_gaussian_process.MCMCGaussianProcess(configspace, kernel, n_mcmc_walkers=20, chain_length=50, burning_steps=50, mcmc_sampler='emcee', average_samples=False, normalize_y=True, instance_features=None, pca_components=7, seed=0)[source]

Bases: AbstractGaussianProcess

Implementation of a Gaussian process model which out-integrates its hyperparameters by Markow-Chain-Monte-Carlo (MCMC). If you use this class make sure that you also use an integrated acquisition function to integrate over the GP’s hyperparameter as proposed by Snoek et al.

This code is based on the implementation of RoBO:

Klein, A. and Falkner, S. and Mansur, N. and Hutter, F. RoBO: A Flexible and Robust Bayesian Optimization Framework in Python In: NIPS 2017 Bayesian Optimization Workshop

Parameters:
  • configspace (ConfigurationSpace) –

  • kernel (Kernel) – Kernel which is used for the Gaussian process.

  • n_mcmc_walkers (int, defaults to 20) – The number of hyperparameter samples. This also determines the number of walker for MCMC sampling as each walker will return one hyperparameter sample.

  • chain_length (int, defaults to 50) – The length of the MCMC chain. We start n_mcmc_walkers walker for chain_length steps, and we use the last sample in the chain as a hyperparameter sample.

  • burning_steps (int, defaults to 50) – The number of burning steps before the actual MCMC sampling starts.

  • mcmc_sampler (str, defaults to "emcee") – Choose a self-tuning MCMC sampler. Can be either emcee or nuts.

  • normalize_y (bool, defaults to True) – Zero mean unit variance normalization of the output values.

  • instance_features (dict[str, list[int | float]] | None, defaults to None) – Features (list of int or floats) of the instances (str). The features are incorporated into the X data, on which the model is trained on.

  • pca_components (float, defaults to 7) – Number of components to keep when using PCA to reduce dimensionality of instance features.

  • seed (int) –

property meta: dict[str, Any]

Returns the meta data of the created object.

property models: list[smac.model.gaussian_process.gaussian_process.GaussianProcess]

Returns the internally used gaussian processes.