Search code examples
javacluster-analysisweka

How to define Kmeans cluster of the new data


Im trying to cluster some data and wanna learn accurancy of it on weka.I mean Lets say, we cluster our training data to n groups but now we have a new test data to learn clusters. How can we do it? I checked the samples but all of them are about to test in training data.


Solution

  • Use the FilteredClusterer, and then choose KMeans in the Configuration Dialog of the FilteredClusterer.

    Here is some text from the "More" button that shows some documentation about this clusterer:

    NAME weka.clusterers.FilteredClusterer

    SYNOPSIS Class for running an arbitrary clusterer on data that has been passed through an arbitrary filter. Like the clusterer, the structure of the filter is based exclusively on the training data and test instances will be processed by the filter without changing their structure.