Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

build_graph

Construct the adjacency matrix for a topic graph


Description

The lasso is used to determine which edges are present in a topic graph. The original R code was written by David M. Blei and co-authors and is available together with the C code for fitting the CTM.

Usage

build_graph(x, lambda, and = TRUE)

Arguments

x

Object of class "CTM".

lambda

Numeric in [0,1] indicating the relative bound on the L1-norm of the parameters.

and

Logical; if TRUE the graph is computed by taking the intersection of the neighbors, otherwise the union is determined.

Value

Returns an adjacency matrix for the topics versus topics graph.

Author(s)

David M. Blei, modified by Bettina Gruen.

References

Blei D.M., Lafferty J.D. (2007). A Correlated Topic Model of Science. The Annals of Applied Statistics, 1(1), 17–35.


topicmodels

Topic Models

v0.2-12
GPL-2
Authors
Bettina Grün [aut, cre] (<https://orcid.org/0000-0001-7265-4773>), Kurt Hornik [aut] (<https://orcid.org/0000-0003-4198-9911>), David M Blei [ctb, cph] (VEM estimation of LDA and CTM), John D Lafferty [ctb, cph] (VEM estimation of CTM), Xuan-Hieu Phan [ctb, cph] (MCMC estimation of LDA), Makoto Matsumoto [ctb, cph] (Mersenne Twister RNG), Takuji Nishimura [ctb, cph] (Mersenne Twister RNG), Shawn Cokus [ctb] (Mersenne Twister RNG)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.