Skip to content

Commit 40d0606

Browse files
Merge pull request #157 from hyperion-ml/persephone-refactor
debug gmm
2 parents dc2cd50 + 025a137 commit 40d0606

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

hyperion/np/pdfs/mixtures/exp_family_mixture.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,6 @@ def fit(
105105
)
106106
elbo_val[epoch] = self.elbo(None, N=N, u_x=u_x, log_h=log_h_val)
107107

108-
print(
109-
elbo[epoch] / x.shape[0],
110-
np.mean(self.log_prob(x, mode="nat")),
111-
np.mean(self.log_prob(x, mode="std")),
112-
)
113-
114108
if x_val is None:
115109
return elbo, elbo / x.shape[0]
116110
else:

hyperion/np/pdfs/mixtures/gmm_diag_cov.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ def Mstep(self, N, u_x):
180180

181181
if self.update_Lambda:
182182
S = S / N[:, None] - self.mu**2
183-
# S_floor = self.var_floor * np.mean(S[N > self.min_N], axis=0)
184-
# S_floor = np.maximum(S_floor, 1e-10)
185-
# S = np.maximum(S, S_floor)
183+
S_floor = self.var_floor * np.mean(S[N > self.min_N], axis=0)
184+
S_floor = np.maximum(S_floor, 1e-10)
185+
S = np.maximum(S, S_floor)
186186
self.Lambda = 1 / S
187187
self._Sigma = S
188188
self._cholLambda = None

0 commit comments

Comments
 (0)