gregversteeg / corex_topic

Hierarchical unsupervised and semi-supervised topic models for sparse count data with CorEx
Apache License 2.0
626 stars 119 forks source link

[Question] Hierarchical Topic Model #50

Closed pat266 closed 3 years ago

pat266 commented 3 years ago

From the ReadMe file, we can create a Hierarchical Topic Model from something like this:

# Train the first layer
topic_model = ct.Corex(n_hidden=100)
topic_model.fit(X)

# Train successive layers
tm_layer2 = ct.Corex(n_hidden=10)
tm_layer2.fit(topic_model.labels)

tm_layer3 = ct.Corex(n_hidden=1)
tm_layer3.fit(tm_layer2.labels)

I'm wondering how I can use this Hierarchical Topic Model? Moreover, what are some methods that I should use for the model?