Extracting information from confusion matrix, classificationLearner

3 ビュー (過去 30 日間)
Tea
Tea 2019 年 6 月 11 日
回答済み: Aditya 2024 年 1 月 31 日
Hi everyone,
Currently I am working with classificationLearner app. I am wondering is there a way to see, in my data, where is classifier making mistake? To be more precise, is it possible to see exactly where in my data false positives or false negatives are ocuring?
Thank you

回答 (1 件)

Aditya
Aditya 2024 年 1 月 31 日
When you're working with the Classification Learner app in MATLAB, you can indeed investigate where your classifier is making mistakes in terms of false positives and false negatives. Here's a step-by-step guide on how you can do this:
  1. Train Your Model: Use the Classification Learner app to train your model with your dataset.
  2. Test Your Model: After training, test your model using a validation set or the same dataset if you don't have a separate validation set.
  3. Confusion Matrix: Within the app, you can view the confusion matrix, which shows the true positives, false positives, false negatives, and true negatives for each class.
  4. Export the Model: Export your trained model to the MATLAB workspace by clicking the "Export Model" button.
  5. Predict Labels: Use the exported model to predict labels for your dataset.
  6. Compare Predictions: Compare the predicted labels with the actual labels to find where the discrepancies are.
  7. Find Misclassified Samples: Using the comparison result, identify the indices of the false positives and false negatives.
  8. Analyze the Misclassified Samples: Now that you have the indices of the misclassified samples, you can examine these specific cases in your dataset to understand where and why the classifier is making mistake.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by