Skip to content

Commit c54e3fb

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hmmlearn/_emissions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ 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 self._needs_sufficient_statistics_for_covars():
152152
stats['post'] += posteriors.sum(axis=0)
153153
stats['obs'] += posteriors.T @ X
154154

0 commit comments

Comments
 (0)