How to get the Incorrectly clustered instances after ClusterEvaluation through the latest weka-python-wrapper 0.3.8?
<p>I'm learning the Clustering of Weka and trying to get the "Incorrectly clustered instances" after 'ClusterEvaluation' with the python-weka-wrapper 0.3.8 (python 2.7).</p>

<p>Currently, I have the class attribute in the input arff file, build the data model successfully, and can get the output of num of clusters &amp; cluster_assignments &amp; Clustered Instances of each cluster in the training set ...etc (which all followed the example of python-weka-wrapper-examples/src/wekaexamples/clusterers/clusterers.py)</p>

<p>However, I want to know whether each instance clustered correctly as the labeled class of input arff or not, and also the ratio of incorrectly clustered instances (just like the output result from Weka GUI).</p>

<p>I'm not sure where to set the options like <a href="http://i.stack.imgur.com/HhAAO.png" rel="nofollow">this</a> from Weka GUI v3.8.0 /Explore/Cluster/Cluster mode/Classes to Clusters evaluation before I run the weka.clusterers.ClusterEvaluation module.</p>

<p>Is there anyone know how to do the mapClasses(<a href="http://weka.sourceforge.net/doc.stable/weka/clusterers/ClusterEvaluation.html#mapClasses-int-int-int:A:A-int:A-double:A-double:A-int-" rel="nofollow">http://weka.sourceforge.net/doc.stable/weka/clusterers/ClusterEvaluation.html#mapClasses-int-int-int:A:A-int:A-double:A-double:A-int-</a>) via python-weka-wrapper?<br/> Or anyway to get the ratio of clustered instances result v.s labeled class attribute?</p>

<p>Appreciate!</p>

<p>If your <code>Instances</code> object for testing has a class attribute set when you perform cluster evaluation using the <code>ClusterEvaluation</code> class, you can use the <code>classes_to_clusters</code> property to obtain the mapping that has been collected while evaluating the clusterer. The equivalent Java method is <a href="http://weka.sourceforge.net/doc.dev/weka/clusterers/ClusterEvaluation.html#getClassesToClusters--" rel="nofollow">ClusterEvaluation.getClassesToClusters</a>.
The <code>mapClasses</code> method hasn't been exposed as Python function.</p>

python weka