plot_hLDA_betas: Visualizes Topic Composition of a Fitted hLDA Model

View source: R/plot_hlda_betas.R

plot_hLDA_betasR Documentation

Visualizes Topic Composition of a Fitted hLDA Model

Description

Visualizes Topic Composition of a Fitted hLDA Model

Usage

plot_hLDA_betas(
  hLDA_model,
  reorder_feature = TRUE,
  min_p = 0.01,
  color_by = "path",
  print_legend = FALSE
)

Arguments

hLDA_model

(required, hLDA.model) object returned by hLDA.

reorder_feature

(optional, logical, default = TRUE) whether features should be re-ordered to group features belonging to the same topics in the visualization of the topic composition.

min_p

(optional, real in ]0,1[, default = 0.01) the proportion a feature must have in any topic to be included in the topic composition visualization.

color_by

(optional, character, default = "path") specifies the variable that should be used for coloring the visualization.

print_legend

(optional, logical, default = FALSE) whether a legend should be printed to the console.

Value

A ggplot2 object describing the sample composition.

See Also

plot_hLDA

Examples

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

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