Loading...

verticapy.mlops.model_versioning.RegisteredModel.predict#

RegisteredModel.predict(vdf: str | vDataFrame, X: str | list[str] | None = None, name: str | None = None, cutoff: int | float | Decimal | None = None, inplace: bool = True, version: int | None = None) vDataFrame#

Makes predictions on the input relation.

Parameters#

vdf: SQLRelation

Object used to run the prediction. You can also specify a customized relation, but you must enclose it with an alias. For example, (SELECT 1) x is valid, whereas (SELECT 1) and “SELECT 1” are invalid.

X: SQLColumns, optional

List of the columns used to deploy the models. If empty, the model predictors are used.

name: str, optional

Name of the added vDataColumn. If empty, a name is generated.

cutoff: PythonNumber, optional

Cutoff for which the tested category is accepted as a prediction. This parameter is only used for binary classification.

inplace: bool, optional

If set to True, the prediction is added to the vDataFrame.

version: int, optional

When the version is None, the registered model with “production” status will be used for prediction. When the version is specified, the registered model that version will be used. It will throw an error if it doesn’t find such a model.

Returns#

vDataFrame

the input object.