10 #ifndef META_TOPICS_LDA_MODEL_H_
11 #define META_TOPICS_LDA_MODEL_H_
15 MAKE_NUMERIC_IDENTIFIER(topic_id, uint64_t)
35 lda_model(std::shared_ptr<index::forward_index> idx, uint64_t num_topics);
51 virtual void run(uint64_t num_iters,
double convergence) = 0;
60 void save_doc_topic_distributions(
const std::string&
filename)
const;
69 void save_topic_term_distributions(
const std::string& filename)
const;
77 void save(
const std::string& prefix)
const;
97 virtual double compute_term_topic_probability(term_id term,
98 topic_id topic)
const = 0;
107 virtual double compute_doc_topic_probability(doc_id doc,
108 topic_id topic)
const = 0;
113 std::shared_ptr<index::forward_index>
idx_;