Bag-Of-Words K-Means Clustering

The utility performs K-Means clustering procedure on the input file ("-i") in the Bag-Of-Words format ".Bow". It produces 3 types of output files:

  1. coded file with the partition ("-op"),
  2. text file with the description of the clusters, centroids and quality measures, and
  3. XML file with the result of clustering.

With the parameter "-docs" the number of clustered documents is determined (value "-1" means all documents"). The parameter "-clusts" determines the final
number of clusters. The parameter "-rseed" determines the value of random-number-generator seed, where value 0 means nondeterministic value. The parameter "-ctrials" determines the number of different runs/trials of K-Means algorithm in a search for the best solution. The parameter "-ceps" determines convergence epsilon value which influences the stopping criterium for the K-Means algorithm. The parameter "-cutww" determines the percentage of the sum of the weights for the best words in the centroids which appear in the textual output file. The parameter "-mnwfq" determines the minimal document-frequency of the words which are used for the document representation.

usage: BowKMeans.exe
-i:Input-File (default:'')
-op:Output-BowPartition-File (default:'KMeans.BowPart')
-ot:Output-Txt-File (default:'KMeans.Txt')
-ox:Output-Xml-File (default:'KMeans.Xml')
-docs:Documents (default:-1)
-clusts:Clusters (default:10)
-rseed:RNG-Seed (default:1)
-ctrials:Clustering-Trials (default:1)
-ceps:Convergence-Epsilon (default:10)
-cutww:Cut-Word-Weight-Sum-Percentage (default:0.5)
-mnwfq:Minimal-Word-Frequency (default:5)

Example:
BowKMeans.exe -i:Reuters21578.Bow -docs:1000 -clusts:10

The above example call clusters first 1000 documents (-docs:) from Reuters21578.Bow (-i:) into 10 clusters (-clusts:). Files KMeans.Txt (textual description of results), KMeans.Xml (results in XML form) and KMeans.BowPart (binary representation of partition) are created.