xmeans

How to save cluster assignments in output file using Weka clustering XMeans?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 16:04:37
问题 Context I want to use Weka clustering algorithm XMeans . However I cannot figure out how to obtain cluster assignments from GUI of Weka . At the moment I can only see a list of cluster IDs along with percentage of entries assigned to each cluster. Question There any way to save cluster assignments for each entry in, e.g. CSV format? 回答1: Do everything in the "Preprocess Panel". This is one way to do this: Load Data File. Remove any Classification Attribute or Identifiers Choose Preprocess /

Getting Xmeans clusterer output programmatically in Weka

孤街醉人 提交于 2019-12-20 14:42:40
问题 When using Kmeans in Weka, one can call getAssignments() on the resulting output of the model to get the cluster assignment for each given instance. Here's a (truncated) Jython example: >>>import weka.clusterers.SimpleKMeans as kmeans >>>kmeans.buildClusterer(data) >>>assignments = kmeans.getAssignments() >>>assignments >>>array('i',[14, 16, 0, 0, 0, 0, 16,...]) The index of each cluster number corresponds to the instance. So, instance 0 is in cluster 14, instance 1 is in cluster 16, and so

Getting Xmeans clusterer output programmatically in Weka

[亡魂溺海] 提交于 2019-12-03 03:38:27
When using Kmeans in Weka, one can call getAssignments() on the resulting output of the model to get the cluster assignment for each given instance. Here's a (truncated) Jython example: >>>import weka.clusterers.SimpleKMeans as kmeans >>>kmeans.buildClusterer(data) >>>assignments = kmeans.getAssignments() >>>assignments >>>array('i',[14, 16, 0, 0, 0, 0, 16,...]) The index of each cluster number corresponds to the instance. So, instance 0 is in cluster 14, instance 1 is in cluster 16, and so on. My question is: Is there something similar for Xmeans? I've gone through the entire API here and don