Gensim has an implementation of DTM, but it is incredibly slow. This has been reported as an issue, but no solution has been found yet. Not even changing LdaSeqModel to use LdaMulticore helps.
There is a pull request that improves this implementation, but it hasn't been merged yet:
It is therefore recommended to still use the old DTM wrapper in Gensim 3.8.3 to use the binary from Blei-lab. This requires two files:
dtm-linux64/darwin64: Blei-lab's C implementation of DTM pre-compiled, depends on the system (could also be compiled from source).
dtmmodel.py: Gensim's 3.8.3 wrapper (no longer supported in >4.0)
The Gensim 3.8.3 wrapper is included in notebooks/utils, but the binary must be downloaded for each OS.
Finally, I commented the LdaSeqModel code in case the PR above gets merged soon.
Gensim has an implementation of DTM, but it is incredibly slow. This has been reported as an issue, but no solution has been found yet. Not even changing LdaSeqModel to use LdaMulticore helps.
There is a pull request that improves this implementation, but it hasn't been merged yet:
It is therefore recommended to still use the old DTM wrapper in Gensim 3.8.3 to use the binary from Blei-lab. This requires two files:
The Gensim 3.8.3 wrapper is included in
notebooks/utils
, but the binary must be downloaded for each OS.Finally, I commented the
LdaSeqModel
code in case the PR above gets merged soon.https://github.com/juanrloaiza/latinamerican-philosophy-mining/blob/0c868ad03fbc7512145aa7633a1869545c62c3cb/notebooks/utils/model.py#L40-L59