Loading...

verticapy.mlops.model_versioning.RegisteredModel.predict_proba

RegisteredModel.predict_proba(vdf: Annotated[str | vDataFrame, ''], X: Annotated[str | list[str], 'STRING representing one column or a list of columns'] | None = None, name: str | None = None, pos_label: Annotated[bool | float | str | timedelta | datetime, 'Python Scalar'] | 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.