MCPcopy Create free account
hub / github.com/bab2min/tomotopy / getTopicWordDist

Method getTopicWordDist

src/python/handler/py_DT.cpp:119–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119std::vector<float> DTModelObject::getTopicWordDist(size_t topicId, size_t timepoint, bool normalize) const
120{
121 auto* inst = getInst<tomoto::IDTModel>();
122 if (topicId >= inst->getK()) throw py::ValueError{ "must topic_id < k" };
123 if (timepoint >= inst->getT()) throw py::ValueError{ "must topic_id < t" };
124 return inst->getWidsByTopic(topicId + inst->getK() * timepoint, normalize);
125}
126
127py::UniqueObj DTModelObject::getCountByTopic() const
128{

Callers

nothing calls this directly

Calls 2

getWidsByTopicMethod · 0.80
getKMethod · 0.45

Tested by

no test coverage detected