mmgp.backends.gpjax

Classes

Regressor

gpjax regressor

Module Contents

class mmgp.backends.gpjax.Regressor(options: dict)[source]

Bases: mmgp.regressor.RegressorBase

gpjax regressor

Parameters:
  • algo (str) – The regression algorithm to use.

  • options (dict) – A dictionary of options specific to the chosen algorithm. Allowed fields are “kernel”, “optim”, “num_restarts”, “max_iters” and “anisotropic”.

algo = 'GPJax'[source]
options[source]
fit(X: numpy.ndarray, y: numpy.ndarray) Self[source]

Train the regression model on the provided data.

Parameters:
  • X (np.ndarray) – The input features for training.

  • y (np.ndarray) – The target values for training.

predict(X: numpy.ndarray) numpy.ndarray[source]

Make predictions using the trained regression model.

Parameters:

X (np.ndarray) – The input features for making predictions.

Returns:

Predicted target values.

Return type:

np.ndarray

abstractmethod predict_Monte_Carlo_draws(X: numpy.ndarray, size: int = 100) numpy.ndarray[source]

Generate Monte Carlo draws from the trained regression model.

Parameters:
  • X (np.ndarray) – The input features for generating draws.

  • size (int, optional) – The number of Monte Carlo draws to generate. Defaults to 100.

Returns:

Monte Carlo draws from the posterior of the regression model.

Return type:

np.ndarray