tidylda0.0.7 package

Latent Dirichlet Allocation Using 'tidyverse' Conventions

posterior

Draw from the marginal posteriors of a tidylda topic model

predict.tidylda

Get predictions from a Latent Dirichlet Allocation model

print.tidylda

Print Method for tidylda

recover_counts_from_probs

Get Count Matrices from Beta or Theta (and Priors)

reexports

Objects exported from other packages

refit.tidylda

Update a Latent Dirichlet Allocation topic model

nih

Abstracts and metadata from NIH research grants awarded in 2014

augment.tidylda

Augment method for tidylda objects

calc_lambda

Calculate a matrix whose rows represent P(topic_i|tokens)

calc_lda_r2

Calculate R-squared for a tidylda Model

calc_prob_coherence

Probabilistic coherence of topics

convert_dtm

Convert various things to a dgCMatrix to work with various functions...

create_lexicon

Make a lexicon for looping over in the gibbs sampler

fit_lda_c

Main C++ Gibbs sampler for Latent Dirichlet Allocation

format_alpha

Format alpha For Input into fit_lda_c

format_eta

Format eta For Input into fit_lda_c

generate_sample

Generate a sample of LDA posteriors

glance.tidylda

Glance method for tidylda objects

initialize_topic_counts

Initialize topic counts for gibbs sampling

new_tidylda

Construct a new object of class tidylda

summarize_topics

Summarize a topic model consistently across methods/functions

tidy_dgcmatrix

Create a tidy tibble for a dgCMatrix

tidy_triplet

Utility function to tidy a simple triplet matrix

tidy.tidylda

Tidy a matrix from a tidylda topic model

tidylda_bridge

Bridge function for fitting tidylda topic models

tidylda-package

Latent Dirichlet Allocation Using 'tidyverse' Conventions

tidylda

Fit a Latent Dirichlet Allocation topic model

Implements an algorithm for Latent Dirichlet Allocation (LDA), Blei et at. (2003) <https://www.jmlr.org/papers/volume3/blei03a/blei03a.pdf>, using style conventions from the 'tidyverse', Wickham et al. (2019)<doi:10.21105/joss.01686>, and 'tidymodels', Kuhn et al.<https://tidymodels.github.io/model-implementation-principles/>. Fitting is done via collapsed Gibbs sampling. Also implements several novel features for LDA such as guided models and transfer learning.

  • Maintainer: Tommy Jones
  • License: MIT + file LICENSE
  • Last published: 2025-11-14