LdaModel predict¶
-
predict
(self, document)¶ [ALPHA] Predict conditional probabilities of topics given document.
Parameters: document : list
Document whose topics are to be predicted.
Returns: : dict
Dictionary containing predicted topics. The data returned is composed of multiple keys:
list of doubles | topics_given_docList of conditional probabilities of topics given document.int : new_words_countCount of new words in test document not present in training set.double | new_words_percentagePercentage of new words in test document.Predicts conditional probabilities of topics given document using trained Latent Dirichlet Allocation model. The input document is represented as a list of strings
Examples
See here for examples.