Multi objective model
smac.model.multi_objective_model
#
MultiObjectiveModel
#
MultiObjectiveModel(
models: AbstractModel | list[AbstractModel],
objectives: list[str],
seed: int = 0,
)
Bases: AbstractModel
Wrapper for the surrogate model to predict multiple objectives.
Parameters#
models : AbstractModel | list[AbstractModel] Which model should be used. If it is a list, then it must provide as many models as objectives. If it is a single model only, the model is used for all objectives. objectives : list[str] Which objectives should be used. seed : int
Source code in smac/model/multi_objective_model.py
predict
#
Predicts mean and variance for a given X. Internally, calls the method _predict
.
Parameters#
X : np.ndarray [#samples, #hyperparameters + #features] Input data points. covariance_type: str | None, defaults to "diagonal" 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.
Returns#
means : np.ndarray [#samples, #objectives] The predictive mean. vars : np.ndarray [#samples, #objectives] or [#samples, #samples] | None Predictive variance or standard deviation.
Source code in smac/model/abstract_model.py
train
#
Trains the random forest on X and Y. Internally, calls the method _train
.
Parameters#
X : np.ndarray [#samples, #hyperparameters + #features] Input data points. Y : np.ndarray [#samples, #objectives] The corresponding target values.
Returns#
self : AbstractModel