You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### This is a C++ implementation of the simple K-Means clustering algorithm.
4
6
5
7
K-means clustering is a type of unsupervised learning, which is used when you have unlabeled data (i.e., data without defined categories or groups). The goal of this algorithm is to find groups in the data, with the number of groups represented by the variable K. The algorithm works iteratively to assign each data point to one of K groups based on the features that are provided. Data points are clustered based on feature similarity.
@@ -13,8 +15,14 @@ The input supports any number of points and any number of dimensions. Make the "
13
15
* Make a file "input.txt" with all the point coordinates. The format should be as shown below (the example has 2-dimensional coordinates):
14
16
15
17

16
-
* Run the kmeans binary with the input file name, number of clusters and output directory as command line arguments, as shown below:
18
+
* Run the kmeans binary with the input file name, number of clusters and output directory as command line arguments
19
+
20
+
Run this command :
21
+
`
22
+
./kmeans input.txt 2 cluster-details
23
+
`
17
24
25
+
Output :
18
26

19
27
* The output will be 2 files in the output directory (eg: cluster-details) which contains the center point of each cluster, and cluster detail for each point.
0 commit comments