powered by
This function factorizes samples matrix into (usually) two matrices W the cluster centroids and H the cluster membership,
nmfCluster(data = NULL, rank = NULL)
A Data set
Specification of the factorization rank
A list of cluster labels, a R object of class "nmf" and the centers of the clusters
# NOT RUN { library(datasets) data(iris) rndSamples <- sample(nrow(iris),100) trainData <- iris[rndSamples,] testData <- iris[-rndSamples,] cls <- nmfCluster(trainData[,1:4],rank=3) # }
Run the code above in your browser using DataLab