Build clusters and save cluster attributes with random selection or k-means ++ centroid initialization. Returns a list containing: 1. data frame of the attributes and clustering for each data point; 2. total within cluster sum of square; 3. data frame of k centroids.
fit(data, K, method)
data
Data frame. Attributes as columns and data points as rows
k
Intger. Number of clusters.
method
String. Centroid initialization method. random
or kmpp
fit(my_data_frame,3,"kmpp")
This package implements the classical unsupervised clustering method, k-means, with options for choosing the initial centroids (e.g. random and kmeans++). Users will be able to find clusters in their data, label new data, and observe the clustering results.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.