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 K means clustering algorithm I designed. When the module is initialised it takes 3 parameters:
4
+
no_K Number of centroids
5
+
iterations Number of iterations to run
6
+
plot If the results should be plotted or not (True/False)
7
+
8
+
All the above parameters also have default settings if not specified
9
+
10
+
On top of this there is 1 compulsory input parameter X, this is the data the algorithm will be trained on. This is accepted in the form of a Numpy array
11
+
12
+
Run():
13
+
The modules K Means Clustering algorithm can be trained with the Run() function. If plot is set to true, it will graphically show the centroids in relation to the data
14
+
15
+
Other functionalities in this module are:
16
+
17
+
Get_Out():
18
+
This reproduces the data with an allocated centroid aswell (in the form of an integer). This data is represented as a a Numpy array
19
+
20
+
Get_Kmeans():
21
+
This produces the co-ordinates for each centroid
22
+
23
+
Get_Parameters():
24
+
This returns the parameters used in the K Means clustering algorithm
0 commit comments