mmpca_clust: Greedy procedures for joint inference and clustering in MMPCA

Description Usage Arguments Value

View source: R/mmpca_clust.R

Description

Perform clustering of count data using the MMPCA model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
mmpca_clust(
  dtm,
  Q,
  K,
  model = NULL,
  Yinit = "random",
  method = "BBCVEM",
  init.beta = "lda",
  keep = 1L,
  max.epochs = 10L,
  verbose = 1L,
  nruns = 1L,
  mc.cores = max(1, (detectCores() - 1))
)

Arguments

dtm

an NxV DocumentTermMatrix with term-frequency weighting.

Q

The number of clusters

K

The number of topics (latent space dimension)

model

A given model in which to take the controls for the VE-steps in the greedy procedure. If NULL, a model of class mmpcaClust is created with default controls (see mmpcaClustcontrol class for more details).

Yinit

Parameter for the initialization of Y. It can be either:

  • a string or a function specifying the initialization procedure. It should be one of ('random', 'kmeans_lda'). See benchmarks-functions functions for more details.

  • A vector of length N with Q modalities, specifying the initialization clustering.

method

The clustering algorithm to be used. Only "BBCVEM" is available : it corresponds to the branch and bound C-VEM of the original article.

init.beta

Parameter for the initialization of the matrix beta. It can be either:

  • a string specifying the initialization procedure. It should be one of ('random', 'lda'). See initializeBeta() for more details.

  • A KxV matrix with each row summing to 1.

keep

The evolution of the bound is tracked every keep iteration

max.epochs

Specifies the maximum number of pass allowed on the whole dataset.

verbose

verbosity level

nruns

number of runs of the algorithm (default to 1) : the run achieving the best evidence lower bound is selected.

mc.cores

The number of CPUs to use when fitting in parallel the different models (only for non-Windows platforms). Default is the number of available cores minus 1.

Value

An object of class "mmpcaClust" containing the fitted model.


MoMPCA documentation built on Jan. 21, 2021, 5:09 p.m.