Multiclass Classification

Multiclass classification models predict one of more than two outcomes. In Aporia, these models are represented with the multiclass model type.

Examples of multiclass classification problems:

  • Is this product a book, movie, or clothing?

  • Is this movie a romantic comedy, documentary, or thriller?

  • Which category of products is most interesting to this customer?

Frequently, multiclass models output a confidence value or a score for each class.

Integration

To monitor a multiclass model, create a new model version with a string field representing the predicted class, and optionally a dict field with the probabilities for all classes:

apr_model = aporia.create_model_version(
  model_id="<MODEL_ID>",
  model_version="v1",
  model_type="multiclass"
  features={
     ...
  },
  predictions={
    "product_type": "string",
    "proba": "dict"
  },
)

Next, connect to a data source or manually log predictions like so:

To log actuals for this prediction:

If you don't need to monitor probabilities, you may omit the proba field.

Last updated