Learn R Programming

MoMPCA (version 1.0.1)

benchmarks-functions: Benchmarks functions for clustering

Description

These are wrapper to other methods for the clustering of count data. They can be used to initialize the clustering. It is also possible to implement your own benchmark function depending on other packages.

Usage

benchmark.random(dtm, Q, ...)

benchmark.kmeans_lda(dtm, Q, K, nruns = 1, ...)

Arguments

dtm

an S4 object of class '>mmpcaClust

Q

The number of clusters

...

Some argument to be consistent with the function's skeleton : K and nruns are optional arguments for some of them.

K

Number of topics (dimension of the latent space).

nruns

Number of restart of the kmeans() algorithm.

Value

A vector of size equal to the number of row of dtm, containing a Q-clustering

<code>benchmark.random</code>

Random initialisation of the clustering. Arguments K and nruns are unused

<code>benchmarks.kmeans_lda</code>

Cluster the matrix theta obtained by a topicmodels LDA with K topics