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

Method getLLRest

src/TopicModel/LDACVB0Model.hpp:231–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229 }
230
231 double getLLRest(const _ModelState& ld) const
232 {
233 double ll = 0;
234 const size_t V = this->realV;
235 // topic-word distribution
236 // it has the very-small-value problem
237 ll += (math::lgammaT(V*eta) - math::lgammaT(eta)*V) * K;
238 for (Tid k = 0; k < K; ++k)
239 {
240 ll -= math::lgammaT(ld.numByTopic[k] + V * eta);
241 for (Vid v = 0; v < V; ++v)
242 {
243 ll += math::lgammaT(ld.numByTopicWord(k, v) + eta);
244 }
245 }
246 return ll;
247 }
248
249 double getLL() const
250 {

Callers 1

getLLMethod · 0.45

Calls 1

lgammaTFunction · 0.85

Tested by

no test coverage detected