LDA for the masses (who use R)

Long time no post. I’ve been busy with lots of stuff: writing my thesis, renaming this blog to pleasescoopme.com, and other stuff which I’ll post soon enough. Another thing I’ve been working on is an R package that implements collapsed Gibbs samplers (written in C) for some of the models I’ve been using: latent Dirichlet allocation (LDA), the mixed-membership stochastic blockmodel (MMSB), and supervised LDA (sLDA). It’s still somewhat experimental but I’ve found it to be immensely useful already. Here some included demos to show off what you can already do out of the box (plots made with the fantastic ggplot2 package):

You too can make all these pretty pictures by downloading the package here. Then simply run ‘R CMD INSTALL lda_1.0.tar.gz’ to install the package and you’ll be ready to go! All of you out there who work with these models, or want to start working with these models, give it a shot and gimme any feedback you have. I hope to improve things and add more models in some upcoming releases.



Filed under Uncategorized

7 responses to “LDA for the masses (who use R)

  1. Chong

    sounds pretty cool!

  2. Adnan

    Hi Jonathan,

    Great stuff…I’m playing with the package right now. I was just wondering if you have any plans for implementing a hierarchical lda model?

    • Good suggestion. I think some of the other members of the group at princeton *cough cough* have implementations that I would love to roll up into this package.

  3. Aurima

    Hello, who could help me with using R in discriminant analysis? can someone send me an example of discriminant analysis using R. Thank you.

    • Hi, sorry for the confusion. Here, LDA = latent Dirichlet allocation, not linear discriminant analysis. For the latter, check out the lda function in the MASS package.

  4. xoapfeng

    Hi, the links demo(lda)
    is not available,
    is there anything wrong?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s