deepGP
neps.optimizers.bayesian_optimization.models.deepGP
#
DeepGP
#
DeepGP(
pipeline_space: SearchSpace,
neural_network_args: dict | None = None,
logger=None,
surrogate_model_fit_args: dict | None = None,
checkpointing: bool = False,
root_directory: Path | str | None = None,
checkpoint_file: (
Path | str
) = "surrogate_checkpoint.pth",
refine_epochs: int = 50,
**kwargs
)
Gaussian process with a deep kernel
Source code in neps/optimizers/bayesian_optimization/models/deepGP.py
__initialize_gp_model
#
__initialize_gp_model(
train_size: int,
) -> tuple[
GPRegressionModel,
GaussianLikelihood,
ExactMarginalLogLikelihood,
]
Called when the surrogate is first initialized or restarted.
PARAMETER | DESCRIPTION |
---|---|
train_size |
The size of the current training set.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[GPRegressionModel, GaussianLikelihood, ExactMarginalLogLikelihood]
|
model, likelihood, mll - The GP model, the likelihood and the marginal likelihood. |
Source code in neps/optimizers/bayesian_optimization/models/deepGP.py
get_state
#
Get the current state of the surrogate.
RETURNS | DESCRIPTION |
---|---|
current_state
|
A dictionary that represents the current state of the surrogate model. |
Source code in neps/optimizers/bayesian_optimization/models/deepGP.py
load_checkpoint
#
load_checkpoint(state: dict | None = None)
Load the state from a previous checkpoint.
Source code in neps/optimizers/bayesian_optimization/models/deepGP.py
save_checkpoint
#
save_checkpoint(state: dict | None = None)
Save the given state or the current state in a checkpoint file.
PARAMETER | DESCRIPTION |
---|---|
checkpoint_path |
path to the checkpoint file
|
state |
The state to save, if none, it will
TYPE:
|
Source code in neps/optimizers/bayesian_optimization/models/deepGP.py
GPRegressionModel
#
Bases: ExactGP
A simple GP model.
PARAMETER | DESCRIPTION |
---|---|
train_x |
The initial train examples for the GP.
TYPE:
|
train_y |
The initial train labels for the GP.
TYPE:
|
likelihood |
The likelihood to be used.
TYPE:
|
Source code in neps/optimizers/bayesian_optimization/models/deepGP.py
NeuralFeatureExtractor
#
NeuralFeatureExtractor(input_size: int, **kwargs)
Bases: Module
Neural network to be used in the DeepGP