API reference#

Everything below is importable from skgp itself, for example from skgp import GPRegressor. Each page is rendered from the docstrings in the source.

Describe a model#

A description names the columns and settings. It is never fitted in place: fit returns a separate fitted model.

GPRegressor

A description of a Gaussian process regression model that summarises nothing: exact with constant or known noise.

SparseGPRegressor

A description of a sparse Gaussian process regression model, for data with too many rows for an exact one.

GPClassifier

A description of a Gaussian process classifier, for a target with two classes.

SparseGPClassifier

A description of a sparse Gaussian process classifier, for data with too many rows for a GPClassifier.

Fitted models, predictions, scores and checked data#

FittedGPRegressor

A model fitted to data by a GPRegressor or a SparseGPRegressor.

Prediction

What a fitted regressor expects at each row you asked about, in your original units.

FittedGPClassifier

A model fitted to data by a GPClassifier or a SparseGPClassifier.

ClassPrediction

What a fitted classifier expects at each row you asked about: the probability of each of its two classes, and the more likely one.

Score

How well a fitted model's predictions match held-out data with known targets, by one or more scorers: what fitted.score(data) returns.

CheckedData

A dataframe that has passed every data check of a model (a GPRegressor, a SparseGPRegressor, a GPClassifier or a SparseGPClassifier).

scikit-learn estimators#

Importable from skgp.sklearn, for example from skgp.sklearn import GaussianProcessRegressor. See Using skgp with scikit-learn.

GaussianProcessRegressor

skgp's GPRegressor as a scikit-learn estimator: an exact Gaussian process regression model, with skgp's settings.

SparseGaussianProcessRegressor

skgp's SparseGPRegressor as a scikit-learn estimator: a sparse Gaussian process regression model, for data with too many rows for an exact one, with skgp's settings.

GaussianProcessClassifier

skgp's GPClassifier as a scikit-learn estimator: Gaussian process classification of two classes, with skgp's settings.

SparseGaussianProcessClassifier

skgp's SparseGPClassifier as a scikit-learn estimator: Gaussian process classification of two classes for data with too many rows for a GaussianProcessClassifier, with skgp's settings.

neg_crps

The mean continuous ranked probability score (CRPS) of a regressor's predictions of y at the rows X, with its sign flipped, so that higher is better, as scikit-learn's scorers are: a scorer for cross_val_score(scoring=neg_crps) or GridSearchCV.

Global settings#

skgp.config is the one object of the class below. Change a setting for the rest of the session by assigning to it, for example skgp.config.size_warning_rows = 50_000.

class Config[source]#

skgp’s global settings. There is one object, skgp.config; assign to its attributes to change a setting for the rest of the session. A value that is not valid for its setting is refused when you assign it, and so is a name that is not a setting.

size_warning_rows: int#

How many training rows GPRegressor.fit and GPClassifier.fit accept without a warning. It controls only whether the warning is issued, never which model is fitted or what it predicts.

Warnings#

Both are subclasses of UserWarning, so the warnings module can filter them or turn them into errors.

ConvergenceWarning

Fitting did not finish properly, so the fitted model may be less reliable.

LargeDataWarning

GPRegressor.fit or GPClassifier.fit was given more rows than skgp.config.size_warning_rows.