algorithmic modeling for Rhino
This is the first Machine Learning implementation I did from a number of different learning algorithms I plan to implement within SharpMatter.
K-Means is a clustering algorithm that to seeks to learn from the properties of unlabelled data. K-Means aims to partition a given data set in to N clusters within a given property, each data element will belong to the cluster with the nearest mean. The algorithm uses an iterative technique until the data set reaches the desired N clusters (when clusters don't change). At each iteration step each data set is assigned to the cluster whose average mean has the least squared Euclidean distance , then after the new clusters are formed the new centroids are calculated and the process is repeated. The least squared Euclidean distance basically means how far apart the data elements are from each other. The typical set up is the number of n-dimensional vectors (data) to be clustered, K number of clusters and j number of iterations needed until convergence.