topik.models package

Submodules

topik.models.base_model_output module

class topik.models.base_model_output.ModelOutput(vectorized_corpus=None, model_func=None, vocab=None, term_frequency=None, topic_term_matrix=None, doc_lengths=None, doc_topic_matrix=None, **kwargs)[source]

Bases: object

Abstract base class for topic models.

Ensures consistent interface across models, for base result display capabilities.

Attributes

_doc_topic_matrix (mapping of document ids to weights for topic indices) matrix storing the relative topic weights for each document
_topic_term_matrix (mapping of terms to each topic)
doc_lengths
doc_topic_matrix
term_frequency
topic_term_matrix
vocab

topik.models.lda module

topik.models.lda.lda(vectorized_output, ntopics, **kwargs)[source]

topik.models.plsa module

topik.models.plsa.plsa(vectorized_corpus, ntopics, max_iter=100, **kwargs)[source]

Module contents