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

Method getTopicWordDist

src/python/handler/py_HPA.cpp:54–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54std::vector<float> HPAModelObject::getTopicWordDist(size_t topicId, bool normalize) const
55{
56 auto* inst = getInst<tomoto::IHPAModel>();
57 if (topicId > inst->getK() + inst->getK2()) throw py::ValueError{ "must topic_id < 1 + K1 + K2" };
58 return inst->getWidsByTopic(topicId, normalize);
59}
60
61py::UniqueObj HPAModelObject::infer(PyObject* doc, size_t iteration, float tolerance, size_t workers, tomoto::ParallelScheme ps, bool together, PyObject* transform) const
62{

Callers

nothing calls this directly

Calls 2

getWidsByTopicMethod · 0.80
getKMethod · 0.45

Tested by

no test coverage detected