How to cluster using kMeans in Weka?

332 views Asked by At

I have a set of text documents in a folder, which I need to cluster using weka in a java program. But using TextDirectoryLoader to convert the document set into an Instances object gives a format which has class as an attribute. When this is used for clustering, throws a WekaException weka.clusterers.SimpleKMeans: Cannot handle any class attribute!.

How do I convert a set of documents into Instances that can be clustered by Weka's SimpleKMeans?

0

There are 0 answers