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 0x7f020df25990>, 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 0x7f020df25a90>[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.

Parameters

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

Returns

Return type

np.ndarray

_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.

Parameters
  • y (np.ndarray) – Normalized data.

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

Returns

Return type

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