gpytorchwrapper.src.models.model_evaluate

Functions

evaluate_model(model, likelihood, ...)

Evaluate the model on the training and test sets

Classes

ModelEvaluator(model, likelihood[, ...])

Class for evaluating the rmse and correlation of the model predictions on the selected dataset.

class gpytorchwrapper.src.models.model_evaluate.ModelEvaluator(model: ExactGP, likelihood: GaussianLikelihood | MultitaskGaussianLikelihood, output_transformer: object = None)[source]

Bases: object

Class for evaluating the rmse and correlation of the model predictions on the selected dataset.

evaluate_correlation(x: Tensor, y: Tensor) list[float][source]
evaluate_rmse(x: Tensor, y: Tensor) list[float][source]
gpytorchwrapper.src.models.model_evaluate.evaluate_model(model: ExactGP, likelihood: Likelihood, output_transformer: object, train_x: Tensor, train_y: Tensor, test_x: Tensor, test_y: Tensor) tuple[list[float], list[float], list[float]] | tuple[list[float], None, None][source]

Evaluate the model on the training and test sets

Parameters:
  • model (ExactGP) – The trained model

  • likelihood (Likelihood) – The trained likelihood of the model

  • output_transformer (object) – The output transformer

  • train_x (Tensor) – The input training data

  • train_y (Tensor) – The output training data

  • test_x (Tensor) – The input test data

  • test_y (Tensor) – The output test data

Returns:

  • train_rmse (list) – List containing the RMSE values for the training set

  • test_rmse (list or None) – List containing the RMSE values for the test set

  • test_corr (list or None) – List containing the correlation values for the test set