MCPcopy Index your code
hub / github.com/ddbourgin/numpy-ml / _maximize_gamma

Method _maximize_gamma

numpy_ml/lda/lda.py:60–72  ·  view source on GitHub ↗

Optimize variational parameter gamma γ_t = α_t + \sum_{n=1}^{N_d} ϕ_{t, n}

(self)

Source from the content-addressed store, hash-verified

58 return phi
59
60 def _maximize_gamma(self):
61 """
62 Optimize variational parameter gamma
63 γ_t = α_t + \sum_{n=1}^{N_d} ϕ_{t, n}
64 """
65 D = self.D
66 phi = self.phi
67 alpha = self.alpha
68
69 gamma = np.tile(alpha, (D, 1)) + np.array(
70 list(map(lambda x: np.sum(x, axis=0), phi))
71 )
72 return gamma
73
74 def _maximize_beta(self):
75 """

Callers 1

_E_stepMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected