| 84 | } |
| 85 | |
| 86 | std::vector<float> DocumentObject::getSubTopicDist(bool normalize) const |
| 87 | { |
| 88 | if (corpus->isIndependent()) throw py::AttributeError{ "This method can only be called by documents bound to the topic model." }; |
| 89 | auto* inst = corpus->tm->getInst<tomoto::IPAModel>(); |
| 90 | if (!corpus->tm->isPrepared) throw py::RuntimeError{ "train() should be called first for calculating the topic distribution" }; |
| 91 | return inst->getSubTopicsByDoc(getBoundDoc(), normalize); |
| 92 | } |
| 93 | |
| 94 | py::UniqueObj PAModelObject::infer(PyObject* docObj, size_t iteration, float tolerance, size_t workers, tomoto::ParallelScheme ps, bool together, PyObject* transform) const |
| 95 | { |
nothing calls this directly
no test coverage detected