paref.moo_algorithms.minimizer.surrogates.gpr#

Classes

ExactGP0(train_x, train_y, likelihood)

# TBA: add

GPR([training_iter, learning_rate])

Gpr0Torch([training_iter, learning_rate])

class paref.moo_algorithms.minimizer.surrogates.gpr.ExactGP0(train_x: Tensor, train_y: Tensor, likelihood)[source]#

Bases: ExactGP

# TBA: add

forward(x) MultivariateNormal[source]#
class paref.moo_algorithms.minimizer.surrogates.gpr.GPR(training_iter: int = 1000, learning_rate=0.05)[source]#

Bases: object

__call__(x: ndarray) ndarray[source]#
plot_loss()[source]#
std(x: ndarray) ndarray[source]#
train(train_x: ndarray, train_y: ndarray)[source]#
property info#
property model_convergence#
class paref.moo_algorithms.minimizer.surrogates.gpr.Gpr0Torch(training_iter=1000, learning_rate=0.1)[source]#

Bases: object

load_state(state_path: str, train_x: Tensor, train_y: Tensor) bool[source]#

Load a set of hyperparameters together with the training set(!) into the models.

predict_torch(pred_x: Tensor) MultivariateNormal[source]#

Doing predictions based on the models and the prediction data. Input and output need to be tensors. Note that the output need to be of dimension one.

save_state(state_name) bool[source]#

Save the trained hyperparameter to a .pth file.

train_torch(train_x: Tensor, train_y: Tensor) bool[source]#

Train the model with torch tensors as input and output. Note that the output need to be of dimension one.