Method
predictTarget POST
Copy POST

Returns a prediction from a classification or regression model. Optionally, includes explanations.

Arguments:

REQUIRED KEY TYPE DESCRIPTION
Yes deploymentToken str The deployment token to authenticate access to created deployments. This token is only authorized to predict on deployments in this project, so it is safe to embed this model inside of an application or website.
Yes deploymentId str The unique identifier of a deployment created under the project.
Yes queryData dict A dictionary where the 'key' is the column name (e.g. a column with name 'user_id' in your dataset) mapped to the column mapping USER_ID that uniquely identifies the entity against which a prediction is performed and the 'value' is the unique value of the same entity.
No explainPredictions bool If true, returns the SHAP explanations for all input features.
No fixedFeatures list Set of input features to treat as constant for explanations - only honored when the explainer type is KERNEL_EXPLAINER
No nested str If specified, generates prediction delta for each index of the specified nested feature.
No explainerType str The type of explainer to use.
Note: The arguments for the API methods follow camelCase but for Python SDK underscore_case is followed.

Response:

KEY TYPE DESCRIPTION
success Boolean true if the call succeeded, false if there was an error
dict

Exceptions:

TYPE WHEN
DataNotFoundError

deploymentId is not found.

Language: