フィルターのクリア

How to find the percentage accuracy of LDA classifier?

4 ビュー (過去 30 日間)
Zuha Yousuf
Zuha Yousuf 2020 年 3 月 30 日
回答済み: Bhargavi Maganuru 2020 年 4 月 2 日
Hi, I'm looking for any code or function that will help me calculate the percentage accuracy of my LDA classifier. Thanks!
  1 件のコメント
Mohammad Sami
Mohammad Sami 2020 年 3 月 30 日
How did you train your classifier.
The following functions will help you. check documentations for more details
confusionchart Create confusion matrix chart for classification problem
confusionmat Compute confusion matrix for classification problem
perfcurve Receiver operating characteristic (ROC) curve or other performance curve for classifier output

サインインしてコメントする。

回答 (1 件)

Bhargavi Maganuru
Bhargavi Maganuru 2020 年 4 月 2 日
If you have true classes and predicted classes, you can create confusion matrix from it
c = confusionmat(true,predicted);
and find the accuracy using
accuracy = sum(diag(c))/sum(c);

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by