botorch.fit¶
Utilities for model fitting.
-
botorch.fit.
fit_gpytorch_model
(mll, optimizer=<function fit_gpytorch_scipy>, **kwargs)[source]¶ Fit hyperparameters of a gpytorch model.
Optimizer functions are in botorch.optim.fit.
Parameters: - mll (
MarginalLogLikelihood
) – MarginalLogLikelihood to be maximized. - optimizer (
Callable
) – The optimizer function. - kwargs (
Any
) – Arguments passed along to the optimizer function.
Return type: MarginalLogLikelihood
Returns: MarginalLogLikelihood with optimized parameters.
Example
>>> gp = SingleTaskGP(train_X, train_Y) >>> mll = ExactMarginalLogLikelihood(gp.likelihood, gp) >>> fit_gpytorch_model(mll)
- mll (