MIND-Lab / OCTIS

OCTIS: Comparing Topic Models is Simple! A python package to optimize and evaluate topic models (accepted at EACL2021 demo track)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No parameter for topk words per topic

ERijck opened this issue · comments

  • OCTIS version: 1.83
  • Python version: 3.8
  • Operating System: Windows

Description

When training a model, I want to adjust the number of words per topic. However, I did not see this option in the source code of various models. Can you add this option for the different models?

Hi,
the parameter top_words in the train_model function controls what you want. For example,

model = LDA(num_topics=25)
model_output = model.train_model(dataset, top_words=20)

I noticed that this wasn't present in the implementation of NMF and I fixed it. It will be part of the next release. If you notice that it's missing in other models that you want to use, please let me know.
Thanks,

Silvia

For reference, PR #84 fixed the top_words parameter for CTM. The changes are available from OCTIS version 1.11.0. I'm closing this issue.

Silvia