Skip to content

Commit c723e6f

Browse files
committed
If we are updating means or covariances, keep track of the necessary statistics.
1 parent e01a10e commit c723e6f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hmmlearn/_emissions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ def _accumulate_sufficient_statistics(
148148
fwdlattice=fwdlattice,
149149
bwdlattice=bwdlattice)
150150

151-
if self._needs_sufficient_statistics_for_mean():
151+
if self._needs_sufficient_statistics_for_mean() or \
152+
self._needs_sufficient_statistics_for_covars():
152153
stats['post'] += posteriors.sum(axis=0)
153154
stats['obs'] += posteriors.T @ X
154155

0 commit comments

Comments
 (0)