/k_means_implementation

Primary LanguagePythonGNU General Public License v2.0GPL-2.0

k_means_implementation

input format: (points.txt)

A text file specifying the data points in D dimensional space. Each line represents an item, and it contains numerical values (one for each feature) split by spaces.

output format: (output.txt)

Each line represents a cluster center and contains the values of features separated by spaces.

code (K_means.py)

Contains implementation of the k-means clustering algorithm in python.

Run:

python K_means.py points.txt(input file) k(The number of custer centers required)

eg : python K_means.py points.txt 3