Elad Kravi
Elad Kravi

Reputation: 43

Extending LDA model using Mallet

I am trying to extend LDA model by adding another layer of locations. Is it possible to add another layer to Mallet? if so, which classes should I extend?

The process I'm trying to model: 1. Choose a region 2. Choose a topic 3. Choose a word

Upvotes: 1

Views: 234

Answers (1)

David Mimno
David Mimno

Reputation: 1901

The cc.mallet.topics.SimpleLDA class is intended for use as a base for development of new models: https://github.com/mimno/Mallet/blob/master/src/cc/mallet/topics/SimpleLDA.java

There may be alternatives to designing a new model from scratch. If region completely determines the distribution over topics and each document comes from one region, you could simply merge all documents from a region. If each document has one or more regions, you could consider regions as "authors" and implement the Author-Topic model. If you want to measure a more indirect relationship between regions and topics you might try a Dirichlet-Multinomial Regression (DMR) model.

Upvotes: 3

Related Questions