If you have a process for generating Ground Truth Labels for your predictions, you can ingest those labels into the Model Monitor to measure and monitor model prediction quality. The monitor uses the row identifiers in the prediction and ground truth data to match the predicted and expected value. Based on those matches, it calculates the different model quality metrics.
Note
| Prediction data is analyzed through 23:59 of the previous day. Data from the current day is not included. |
For correct ingestion of Ground Truth Label, it is important to map the ground truth label column from the Ground Truth file to its corresponding prediction data column in the prediction dataset. When using the Guided Flow, Step 2 will require you to declare this mapping.
When you apply a date filter, the Model Monitor will use the timestamp values in the prediction data to filter with. It then matches the filtered predictions with the ground truth labels ingested (matches only labels ingested in last 90 days) and calculates the metrics for the matched predictions.
Following prediction quality metrics are supported for Classification models:
-
Accuracy
-
Precision
-
Recall
-
F1
-
AUC ROC
-
Log Loss
-
Gini (Normalized)
You can view the Confusion Matrix and Classification Report for the data in the selected time range in the Charts section below the metrics table.
Note 1: Model monitoring uses the ‘Weighted' method of calculating these metrics.
Note 2: AUC ROC, Log Loss, Gini Norm are calculated only if Prediction Probability column type is declared as part of schema.
Note 3: Sample Weights is used in calculations for only the Gini Norm metric.
Following prediction quality metrics are supported for Regression models:
-
Mean Square Error (MSE)
-
Mean Absolute Error (MAE)
-
Mean Absolute Percentage Error (MAPE)
-
R-Squared (R2)
-
Gini (Normalized)
The Ground Truth Config JSON should capture all information needed to register ground truth data for a registered model. A sample Ground Truth Config
is shown below.
{
"variables": [
{
"name": "y_gt",
"variableType": "ground_truth",
"valueType": "categorical",
"forPredictionOutput": "y"
}
],
"datasetDetails": {
"name": "BMAF-GTLabels-Webinar.csv",
"datasetType": "file",
"datasetConfig": {
"path": "BMAF-GTLabels-Webinar.csv",
"fileFormat": "csv"
},
"datasourceName": "monitoring-shared-bucket",
"datasourceType": "s3"
}
}
Details on each field in the JSON can be found here.