kmeans | k-means clustering |
-d <data> | name of the input data frame |
-dout <dataout> | name of the output data frame |
-cout <cldata> | data frame for clusters |
-k <k> | number of k-means clusters |
This command performs the k-means clustering algorithm in order to divide data into <k> clusters. The centroids of the clusters are stored into the frame <dataout> and the classification information of data records into the classified data <cldata>.
Example (ex5.15): In the example, the Boston data is divided into five clusters, which are visualized through their centroids.
NDA> load boston.dat NDA> select flds -f boston.indus boston.age boston.zn boston.dis NDA> kmeans -d flds -dout clusdat -cout cluscld -k 5 NDA> mkgrp win1 -d clusdat ...