Multi-Class Classification Overview
A classification model with more than two classes.Supported Metrics
Micro-Averaged Precision, Micro-Averaged Recall, Macro-Averaged Precision, Macro-Averaged Recall, Precision for a Class, Recall for a ClassHow To Log Multi-Class Data
Log multi-class classification models based on your use case| Use Case | Description | Expected Fields |
|---|---|---|
| Single-Label | A prediction that has 1 label i.e. A passenger can only be in EITHER economy, business, OR first-class | - prediction scores (dictionary) - actual scores (dictionary, optional) |
| Multi-Label | A prediction that has multiple labels i.e. A song can be multiple genres such as ‘pop-rock’ | - prediction scores (dictionary) - threshold scores (dictionary) - actual scores (dictionary, optional) |
Single-Label Use Case
- Python Pandas Batch
- Python Single Record
Single-Label Use Case Colab
| prediction_scores | actual_scores |
|---|---|
[{"class_name": "economy_class", "score": 0.81},{"class_name": "business_class", "score": 0.42},{"class_name": "first_class", "score": 0.35}] | [{"class_name": "economy_class", "score": 1}] |
Note: class
economy_class has the highest prediction score and will be the prediction labelMulti-Label Use Case
- Python Pandas Batch
- Python Single Record
Multi-Label Use Case Colab
| prediction_scores | threshold_scores | actual_scores |
|---|---|---|
[{"class_name": "jazz", "score": 0.81},{"class_name": "rock", "score": 0.42},{"class_name": "pop", "score": 0.35}] | [{"class_name": "jazz", "score": 0.5},{"class_name": "rock", "score": 0.4},{"class_name": "pop", "score": 0.6}] | [{"class_name": "rock", "score": 1}] |
Note: classes
jazz and rock have prediction scores > threshold scores and will be part of the prediction label.Inferring Labels From Uploaded Scores
To calculate metrics and visualize & troubleshoot data for multi-class models, Arize automatically infers prediction & actual labels from the scores that you upload. Learn how each case is determined below.| Use Case | Prediction Label Determination | Actual Label Determination |
|---|---|---|
| Single-Label | For each prediction, the class with the highest prediction score is the prediction label | The class with an actual score of 1 is the actual label |
| Multi-Label | For each class, there must exist a prediction score and threshold score. If the prediction score > threshold score, the class is a part of the prediction label | Each class with an actual score of 1 is part of the actual label |