smac.epm.base_gp module

class smac.epm.base_gp.BaseModel(configspace: ConfigSpace.configuration_space.ConfigurationSpace, types: List[int], bounds: List[Tuple[float, float]], seed: int, kernel: sklearn.gaussian_process.kernels.Kernel, instance_features: Optional[numpy.ndarray] = None, pca_components: Optional[int] = None)

Bases: smac.epm.base_epm.AbstractEPM

_get_all_priors(add_bound_priors: bool = True, add_soft_bounds: bool = False) List[List[smac.epm.gp_base_prior.Prior]]
_get_gp() sklearn.gaussian_process._gpr.GaussianProcessRegressor
_impute_inactive(X: numpy.ndarray) numpy.ndarray
_normalize_y(y: numpy.ndarray) numpy.ndarray

Normalize data to zero mean unit standard deviation.


y (np.ndarray) – Targets for the Gaussian process


Return type


_set_has_conditions() None
_untransform_y(y: numpy.ndarray, var: Optional[numpy.ndarray] = None) Union[numpy.ndarray, Tuple[numpy.ndarray, numpy.ndarray]]

Transform zeromean unit standard deviation data into the regular space.

This function should be used after a prediction with the Gaussian process which was trained on normalized data.

  • y (np.ndarray) – Normalized data.

  • var (np.ndarray (optional)) – Normalized variance


Return type

np.ndarray on Tuple[np.ndarray, np.ndarray]