Skip to content

Predict classification

inferencemodelsclassification

Use a pretrained classification model to predict new categorical data.

Usually employed after the train_classification step.

Prediction Model

To use this step successfully you need to make sure the dataset you're predicting on is as similar as possible to the one the model was trained on. We check that the necessary data types and columns are present, but you should pay attention to how you handled these in the recipe the model was generated. Any changes might lead to a significant degradation in model performance.

Usage


The following are the step's expected inputs and outputs and their specific types.

Step signature
predict_classification(
    ds: dataset,
    model: model_classification[data]
) -> (predicted: category)

where the object {"param": value} is optional in most cases and if present may contain any of the parameters described in the corresponding section below.

Example

Example call (in recipe editor)
predict_classification(ds, model) -> (data.predicted)

Inputs


ds: dataset

Contains the target column and the rest of the columns you wish to use in the model.


model: file:model_classification[data]

File containing the model used to make the prediction.

Outputs


predicted: column:category

Column containing the model predictions.