Loading...

verticapy.mlops.model_versioning.RegisteredModel.predict_proba#

RegisteredModel.predict_proba(vdf: str | vDataFrame, X: str | list[str] | None = None, name: str | None = None, pos_label: bool | float | str | timedelta | datetime | None = None, inplace: bool = True, version: int | None = None) vDataFrame#

Returns the model’s probabilities using 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.

pos_label: PythonScalar, optional

Class label. For binary classification, this can be either 1 or 0.

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.