user2097866
user2097866

Reputation: 37

Weka - no class and no cluster assign

I am working on a file to predict treatment ways for patients diagnosed with diabetes (level is from 1 to 10). There are 8 different treatment recommendations (256 possible outcome) and I need to cluster them (I have 21 attributes from the original file.). So I used 19 k with SimpleKMean. The problem is I get "no class" assigned for some clusters;

Cluster Window]![enter image description here

Also when I classify it for evaluation, I have the same problem "no cluster" assigned to class and also I lose some of the data. For example there are 940 instances but I have 876 after classifying.

Classify Window]![enter image description here

But the confusion matrix displays the exact numbers. I don't know if it is related but it might help to solve the question. I have used AddCluster method because all my attribute are numeric and I need an additional column from the original file in order to display "Treatment Cluster" (22th attribute). So I run SimpleKMean and Cross-Validation with this new additional attribute which is also my class.

Thanks a lot for your help!!!

Upvotes: 1

Views: 908

Answers (1)

Matthew Spencer
Matthew Spencer

Reputation: 2295

It appears that a class can only be applied to zero or one clusters. As a result, for example, class 9 is being applied to cluster 7, but all of the class 9 values in cluster 8 is not being assigned as it was being allocated to another class. The SimpleKMeans model appears to assign the cluster that generates the minimum classification error on the supplied data.

This problem has been raised before here, where the solution appears to be overriding the evaluation model to allow for one-to-many allocations.

Upvotes: 2

Related Questions