| 109 | } |
| 110 | |
| 111 | std::vector<std::pair<std::string, float>> DTModelObject::getTopicWords(size_t topicId, size_t timepoint, size_t topN) const |
| 112 | { |
| 113 | auto* inst = getInst<tomoto::IDTModel>(); |
| 114 | if (topicId >= inst->getK()) throw py::ValueError{ "must topic_id < k" }; |
| 115 | if (timepoint >= inst->getT()) throw py::ValueError{ "must topic_id < t" }; |
| 116 | return inst->getWordsByTopicSorted(topicId + inst->getK() * timepoint, topN); |
| 117 | } |
| 118 | |
| 119 | std::vector<float> DTModelObject::getTopicWordDist(size_t topicId, size_t timepoint, bool normalize) const |
| 120 | { |
nothing calls this directly
no test coverage detected