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

Method getTopicWordDist

src/python/handler/py_LDA.cpp:337–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335}
336
337std::vector<tomoto::Float> LDAModelObject::getTopicWordDist(size_t topicId, bool normalize) const
338{
339 auto* inst = getInst<tomoto::ILDAModel>();
340 if (topicId >= inst->getK()) throw py::ValueError{ "topic_id must < K" };
341
342 return inst->getWidsByTopic(topicId, normalize);
343}
344
345py::UniqueObj LDAModelObject::infer(PyObject* docObj, size_t iteration, float tolerance, size_t workers, tomoto::ParallelScheme ps, bool together, PyObject* transform) const
346{

Callers

nothing calls this directly

Calls 2

getWidsByTopicMethod · 0.80
getKMethod · 0.45

Tested by

no test coverage detected