After obtaining the result of algorithm fuzzy c means on the iris flower data set. Results are to be checked for their correctness. So, how to derive it in matlab. I mean code for that. please suggest.

  • $\begingroup$ It's not entirely clear what you're asking. Can you edit your question to include more details about what you've done so far, what you're looking for, and what you specifically need help with? $\endgroup$ – mindcrime Oct 6 '17 at 0:25
  • $\begingroup$ Actually i am asking that if there is iris data set (150 instances) used for classification using fuzzy c means algorithm then output classes (3) and target classes(3) . But i can't show its output as it is really very big so here i am giving an example as .. total instances=15 Target_class= [1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3] result_class=[3 3 3 3 3 1 1 1 2 1 2 2 2 1 2] so all data has been classified but how to make a code to find correctly classified data in matlab. $\endgroup$ – Nisha Oct 6 '17 at 6:02

Yes, you can use confusion matrix as a performance metric for a classifier where the output of the classifier is class labels.

If your classifier output is a likelihood floating point value for each of the classes, then you have to use some scheme of converting the likelihoods to a class label. For example, use softmax function for one hot encoding.

So, for the Fuzzy K Means clustering based classifier, you'll have to pick output class label as the 'index' if the Fuzzy cluster with maximum likelihood/ membership score. This will constitute predicted labels.

Using array of test labels and predicted labels to compute confusion matrix is straightforward in any computational platform, including Matlab of course.

- Fuzzy K Means (also called fuzzy c means or FCM) is an unsupervised learning method. This means the assignment of training data points to clusters is not based on their class labels. Therefore, FCM is not used as a discriminative classifier.

Typically, FCM is used as an intermediate module to encode data. The encoded representation is used as a feature vector, in supervised learning, to train a discriminative classifier, such as a SVM.

This is not to say you can not use FCM for classification, but it would only work when data points of the same label occur in reasonably distinct clusters. This almost never happens with real world data and so it's recommended not to use FCM for classification.

  • $\begingroup$ I'm working with fuzzy c means .. not with fuzzy k means and yes output is class labels. So for that thanks $\endgroup$ – Nisha Oct 7 '17 at 7:12
  • $\begingroup$ And the main issue is i'm not getting same result as according to given classes assigned for each data set output is completely different i.e. if for any instance if class suggested is class one initially then in result i'm getting class 2 or three and it is with whole 150 instance data set. That means my result is completely wrong, i am so worried what to do now. $\endgroup$ – Nisha Oct 7 '17 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.