CheckedData#

class CheckedData[source]#

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

Create it with check(data) on the model, or with check(data, for_prediction=True) for rows to predict, which need no target column. Rows to predict may have a target column (for example a held-out set with its true values); it is ignored. Any column that is neither an input, the target nor the column of known noise is ignored too. Passing it to fit or predict skips the checks, so checking once and using the result several times costs one check.

It is valid for any model of the same task (regression or classification) with the same features, target, schema and column of known noise (noise_column, if any) as the model that made it, whatever its class, kernel or other settings, because only those decide what the checks are. A regressor checks that the target holds numbers and a classifier that it holds two classes, so data checked by one is refused by the other. Any other model refuses it with an error that names what differs. Data checked by a model with a different schema (or none) has not passed this model’s schema, so check it again with this model’s check.

Training data (the default) must have at least 5 rows.

It is an immutable snapshot of the data as it was when it was checked: the checked data is copied (or, for an immutable dataframe such as Polars, shared, which is free), so changing your own dataframe afterwards never changes what fit or predict sees from a CheckedData.

model: _Model#

The model whose checks the data passed.