필터 지우기
필터 지우기

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 CenterFile Exchange에서 Statistics 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