Can I plot Confusion Matrix for a One Class SVM prediction

3 ビュー (過去 30 日間)
NCA
NCA 2024 年 9 月 8 日
編集済み: Vandit 2024 年 9 月 8 日
I trained a model with One Class SVM using only one class A.I am testing with a dataset that has both classes in it (Class A and B). I can't seem to get both classes on one Confusion Matrix. Is this normal?.

採用された回答

Vandit
Vandit 2024 年 9 月 8 日
編集済み: Vandit 2024 年 9 月 8 日
Hello @NCA,
The one-class SVM is designed to detect anomalies or outliers in a dataset, so it is trained to recognize only one class. When testing with a dataset that contains both classes, the one-class SVM will classify all instances as either the target class or outliers. Therefore, the confusion matrix will only show the performance of the model in detecting the target class and will not include the other class.
If you want to evaluate the performance of the model on both classes, you would need to use a different classification algorithm that supports multi-class classification, such as a Support Vector Machine (SVM) with a multi-class extension or a different algorithm altogether.
For more information on one-class SVM, please refer to the documentation below:
Hope this helps.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeClassification Learner App についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by