Search code examples
cluster-analysiswekak-meansxmeans

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


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?


Solution

  • Do everything in the "Preprocess Panel".

    This is one way to do this:

    • Load Data File.

    • Remove any Classification Attribute or Identifiers

    • Choose Preprocess / Filter / Unsupervised attribute Filter / AddCLuster

    • Click on the Word "AddCluster", choose the XMeans Clusterer, click Apply.

    • This sghould add a new column "cluster" in the Attribute Panel

    • Click on "Save..." Button to export.