nmfCluster | R Documentation |
This function factorizes samples matrix into (usually) two matrices W the cluster centroids and H the cluster membership,
nmfCluster(data = NULL, rank = NULL)
data |
A Data set |
rank |
Specification of the factorization rank |
A list of cluster labels, a R object of class "nmf" and the centers of the clusters
library(datasets) data(iris) rndSamples <- sample(nrow(iris),100) trainData <- iris[rndSamples,] testData <- iris[-rndSamples,] cls <- nmfCluster(trainData[,1:4],rank=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.