hLDA: Fits a hLDA Model to Count Data

View source: R/hLDA.R

hLDAR Documentation

Fits a hLDA Model to Count Data

Description

Fits a hLDA Model to Count Data

Usage

hLDA(
  x,
  depth,
  gamma = 0.1,
  alpha = 0.1,
  eta = 0.1,
  print = c("nothing", "summary", "everything")
)

Arguments

x

a matrix of counts. Features are on columns and samples are on rows.

depth

(required, integer) the desired depth of the hierarchical structure.

gamma

(optional, real in ]0,1[, default = 0.1) the concentration parameter for introducing new topics.

alpha

(optional, real in ]0,1[, default = 0.1) hyperparameter of Dirichlet distribution for document-depth level.

eta

(optional, real in ]0,1[, default = 0.1) hyperparameter of Dirichlet distribution for topic-word.

print

(optional, character, default = "nothing") What should be printed to the console?

Value

a hLDA.model object.

Examples

x <- matrix(sample(0:100, 1000, replace = TRUE), 20, 50)
m <- hLDA(x, depth = 3)
plot_hLDA(m)

lasy/hLDA documentation built on June 15, 2024, midnight