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: <lazy_import.LazyCallable object at 0x7fb31c8ab350>, instance_features: Optional[numpy.ndarray] = None, pca_components: Optional[int] = None)[source]

Bases: smac.epm.base_epm.AbstractEPM

Abstract base class for all Gaussian process models.

_get_all_priors(add_bound_priors: bool = True, add_soft_bounds: bool = False) → List[List[smac.epm.gp_base_prior.Prior]][source]
_get_gp() → <lazy_import.LazyCallable object at 0x7fb31c8ab450>[source]
_impute_inactive(X: numpy.ndarray) → numpy.ndarray[source]
_normalize_y(y: numpy.ndarray) → numpy.ndarray[source]

Normalize data to zero mean unit standard deviation.


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


Return type


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

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]