Learn R Programming

Evacluster (version 0.1.0)

nmfCluster: Non-negative matrix factorization (NMF)

Description

This function factorizes samples matrix into (usually) two matrices W the cluster centroids and H the cluster membership,

Usage

nmfCluster(data = NULL, rank = NULL)

Arguments

data

A Data set

rank

Specification of the factorization rank

Value

A list of cluster labels, a R object of class "nmf" and the centers of the clusters

Examples

Run this code
# 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