2.1.7 Testing Model Results

After you build a model, it is useful to test the model performance before flashing it to a device. The MPLAB® Machine Learning Development Suite has a useful feature that enables you to see model performance on your dataset before flashing it to a device.

How to Test a Model in the MPLAB Machine Learning Development Suite

The MPLAB Machine Learning Development Suite lets you test your model on any file in your project to see the model performance before flashing it to a device. It gives insight to your model performance by showing the confusion matrix, ground truth vs prediction results, and the feature vector heat map.

  1. Select a model in the Test Model page.

  2. Select one or more of the capture files. Click the Compute Accuracy button to validate it against the test data. To generate the model results, the server emulates the firmware model classifications on the selected sensor data. This provides an accurate view over the performance of the performance you can expect when deploying your model to an edge device.

  3. When the results are finished, you can click the Compute Summary button to see how the confusion matrix performs across all files you just tested against. The ground truth for the confusion matrix is generated based on the labels that you added to your files. You can switch which Session is used to compute the ground truth as well.

  4. Click the Results icon for one of your capture files. The results are summarized as actual prediction-versus-ground truth labels. In the Classification Chart (top), the Y-axis displays the classification name, and the X-axis displays the sample number or time. Classifications are generated by the model at the selected interval for windowing segmentation. Locations where the ground truth and classification do not match are marked by a red X. The Feature Vector Heat Map (bottom) visualizes the features that are generated by each segment prior to being fed into the classifier as a heat map. The values for features are always scaled to a single byte prior to classification.