Random model
smac.model.random_model
#
RandomModel
#
RandomModel(
configspace: ConfigurationSpace,
instance_features: (
dict[str, list[int | float]] | None
) = None,
pca_components: int | None = 7,
seed: int = 0,
)
Bases: AbstractModel
AbstractModel which returns random values on a call to fit.
Source code in smac/model/abstract_model.py
predict
#
Predicts mean and variance for a given X. Internally, calls the method _predict.
| PARAMETER | DESCRIPTION |
|---|---|
X
|
Input data points.
TYPE:
|
covariance_type
|
Specifies what to return along with the mean. Applied only to Gaussian Processes. Takes four valid inputs: * None: Only the mean is returned. * "std": Standard deviation at test points is returned. * "diagonal": Diagonal of the covariance matrix is returned. * "full": Whole covariance matrix between the test points is returned.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
means
|
The predictive mean.
TYPE:
|
vars
|
Predictive variance or standard deviation.
TYPE:
|
Source code in smac/model/abstract_model.py
predict_marginalized
#
Predicts mean and variance marginalized over all instances.
Warning
The input data must not include any features.
| PARAMETER | DESCRIPTION |
|---|---|
X
|
Input data points.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
means
|
The predictive mean.
TYPE:
|
vars
|
The predictive variance.
TYPE:
|
Source code in smac/model/abstract_model.py
train
#
Trains the random forest on X and Y. Internally, calls the method _train.
| PARAMETER | DESCRIPTION |
|---|---|
X
|
Input data points.
TYPE:
|
Y
|
The corresponding target values.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
self
|
TYPE:
|