yakmoR is a simple wrapper for the K-Means C++ library (yakmo) developed by Naoki Yoshinaga.
yakmoR implements orthogonal K-Means. It can work in several rounds. In the first round, a normal K-Means is applied to the data. In each subsequent round, the next clustering is done on a subspace orthogonal to the centroids of the last clustering. This way one produces different views on the data. To speed up the whole procedure, Greg Hamerlys faster K-Means is utilized. Initilization can be done either classically (uniformly random) or by using the K-Means++ scheme.
library(yakmoR) data(iris) irisM = as.matrix(iris[sample(nrow(iris)), -5]) # convert to matrix, also remove class-information dat = irisM[1:100, ] # take first 100 data points for clustering resObj = yakmoR::orthoKMeansTrain (x = dat, k = 3, rounds = 4) centers2 = resObj$centers[[2]] # centers of 2nd round dat = as.matrix( irisM[101:nrow(irisM), -5]) # take rest of data for prediction results = yakmoR::orthoKMeansPredict (x = dat, obj = resObj)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.