smac.epm.random_epm module

class smac.epm.random_epm.RandomEPM(rng: mtrand.RandomState, **kwargs)[source]

Bases: smac.epm.base_epm.AbstractEPM

EPM which returns random values on a call to fit.

logger

logging.Logger

rng

np.random.RandomState

Constructor

Parameters:rng (np.random.RandomState) –
predict(X: numpy.ndarray)

Predict means and variances for given X.

Parameters:X (np.ndarray of shape = [n_samples, n_features (config + instance features)]) – Training samples
Returns:
  • means (np.ndarray of shape = [n_samples, n_objectives]) – Predictive mean
  • vars (np.ndarray of shape = [n_samples, n_objectives]) – Predictive variance
predict_marginalized_over_instances(X: numpy.ndarray)

Predict mean and variance marginalized over all instances.

Returns the predictive mean and variance marginalised over all instances for a set of configurations.

Parameters:X (np.ndarray) – [n_samples, n_features (config)]
Returns:
  • means (np.ndarray of shape = [n_samples, 1]) – Predictive mean
  • vars (np.ndarray of shape = [n_samples, 1]) – Predictive variance
train(X: numpy.ndarray, Y: numpy.ndarray, **kwargs)

Trains the EPM on X and Y.

Parameters:
  • X (np.ndarray [n_samples, n_features (config + instance features)]) – Input data points.
  • Y (np.ndarray [n_samples, n_objectives]) – The corresponding target values. n_objectives must match the number of target names specified in the constructor.
Returns:

self

Return type:

AbstractEPM