How can I calculate the classification accuracy?

Dear Sir,
I used the Adaptive Neuro-Fuzzy inference system (ANFIS) for making trajectories' classification of two different types of ships (tanker ship and fishing boat). I could get the Average testing error, but I can calculate the classification accuracy. I would like you to advise me "How can calculate the classification accuracy??"
I look forward to your response soon
Thank you very much
Mohamed Elwakdy

Answers (3)

7 Comments

Dear Sir,
Thank you very much for your time and interest....
Could you please explain me more....How can I calculate the classification accuracy from the outputs of the ANFIS (in case I used the Subtractive Clustering method which use to estimate the number of clusters and cluster centers in a set of data where each point supposed as a potential cluster center)??
Look forward to your response soon....
Thank you very much
Have a Good Day
I don't know how to use ANFIS. But somehow you have to know if the classification you got is correct or not. You need to have some "ground truth". If you don't know if it's correct or not, on your training set, then why not just assume they're all correct and be done with it?
Dear Sir,
Thank you very much for your time and interest....
I can use an ANFIS well. After prepared the training and checking data in two matrices, I uploaded them to ANFIS GUI and use the Subtractive Clustering thereafter. I could obtain "Average Testing Error" after I trained the Initial FIS by Artificial Neural Network and then I entered the checking data for testing, but I didn't get the Classification accuracy (%) as an Output from ANFIS GUI (I got only "Average Testing Error"). What I know that the ANFIS doesn't give this output. For that, I asked you "How can get the classification accuracy through ANFIS GUI?"
I look forward to your response soon
Thank you very much
Have a Good Day
It sounds like there is no binary accurate/(not accurate) decision made, but it's more of a continuum and it gives you a number related to how inaccurate it is. So one matrix may be inaccurate by 0.03 and another by 0.84. So what's wrong with just getting the average of the testing errors?
Dear Sir,
Thank you very much for your time and interest...
Nothing wrong with just getting the average of the testing errors. I am looking publish a conference/Journal paper in the near future, and I have to compare my results with other results to ensure the acceptance. Some Authors, who published papers before, used the ANFIS for classification and they could obtain ERROR AND ACCURACY. I don't know exactly how they calculated the classification accuracy as in this paper:
https://drive.google.com/file/d/0B254WGMh1VZTSklCaTY1U1FyY2M/view?usp=sharing
As I am looking to compare my results with others that they used the support vector Machine (SVM) classifier, and they calculated the classification accuracy by divided the number of test trajectories correctly classified to the total number of test trajectories. I know how I can calculate the classification accuracy by using the SVM, but I don't know how I can calculated the classification accuracy by using the ANFIS... For that, I asked you the question above...
I look forward to your response soon....
Thank you very much for everything
Sorry - I have never used ANFIS.
Artificial Neural Fuzzy Inference System
https://www.google.com/?gws_rd=ssl#q=anfis+matlab
Hope this helps.
Greg

Sign in to comment.

I encountered the same problem as you,have you solved the problem? Looking forward your help!
You could look at using the 'classperf' function in matlab. It will identify the correct classification for two groups.
see: https://uk.mathworks.com/help/bioinfo/ref/classperf.html
You can then work the percentages out yourself
An example from a logistic regression model of class performance is:
lin = stats(1,1) + stats(2,1)*EQRAT + stats(3,1)*LNSIZE + stats(4,1)*HPI + stats(5,1)*LEVERAGE + stats(6,1)*SEC + stats(7,1)*LLR + stats(8,1)*CASHDUE + stats(9,1)*GOODWILL + stats(10,1)*LIQUIDITY;
phat = (exp(lin)./(1 + exp(lin))); % Probaility that bank failed where FAIL = 1
phat(phat<0.5) = 0; % If probability less than 0.5 assume does not fail ie: FAIL = 0
phat(phat>=0.5) = 1; % If probability more than 0.5 assume does fail ie: FAIL = 1
CP = classperf(FAIL, phat);
CPtbl = CP.DiagnosticTable; % Percentage correctly predicted table
Hope this helps someone!

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange

Asked:

on 7 Feb 2015

Answered:

on 9 Aug 2017

Community Treasure Hunt

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

Start Hunting!