-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error on simple example #27
Comments
I got the same error. Hope someone can help! |
I got another problem when running simle_demo.py: Traceback (most recent call last): And when I try with an even simpler example myself, like this:
I got another error: Could you kindly give some help with this? Thanks a lot! |
As for the error "FloatingPointError: invalid value encountered in multiply", it is because some log transition is -inf. So you only need to add "log_transmatrix[np.isinf(log_transmatrix)] = -1e+8" and it then works. |
hey champion
just getting some errors on the simple example
......................... [ 825/1000, 0.04sec avg, ETA 6.19 ]
......................... [ 850/1000, 0.04sec avg, ETA 5.31 ]
......................... [ 875/1000, 0.04sec avg, ETA 4.42 ]
......................... [ 900/1000, 0.04sec avg, ETA 3.54 ]
......................... [ 925/1000, 0.04sec avg, ETA 2.65 ]
......................... [ 950/1000, 0.04sec avg, ETA 1.77 ]
......................... [ 975/1000, 0.04sec avg, ETA 0.88 ]
......................... [ 1000/1000, 0.04sec avg, ETA 0.00 ]
0.04sec avg, 35.35 total
Fitting with VBEM
................/home/andrewcz/anaconda3/lib/python3.6/site-packages/pyhsmm/internals/hmm_states.py:675: RuntimeWarning: divide by zero encountered in log
np.log(trans_potential),likelihood_log_potential,alphal,betal,
/home/andrewcz/pyslds/pyslds/states.py:594: RuntimeWarning: divide by zero encountered in log
params = (np.log(self.trans_matrix), np.log(self.pi_0), aBl, self._normalizer)
Traceback (most recent call last):
File "simple_demo.py", line 95, in
vbem_lls = [update(test_model) for _ in progprint_xrange(N_vbem_iters)]
File "simple_demo.py", line 95, in
vbem_lls = [update(test_model) for _ in progprint_xrange(N_vbem_iters)]
File "simple_demo.py", line 91, in update
model.VBEM_step()
File "/home/andrewcz/pyslds/pyslds/models.py", line 217, in VBEM_step
self._vb_E_step()
File "/home/andrewcz/pyslds/pyslds/models.py", line 170, in _vb_E_step
state.vb_E_step()
File "/home/andrewcz/pyslds/pyslds/states.py", line 586, in vb_E_step
H_z = self.vb_E_step_discrete_states()
File "/home/andrewcz/pyslds/pyslds/states.py", line 595, in vb_E_step_discrete_states
return hmm_entropy(params, self.all_expected_stats)
File "/home/andrewcz/pyslds/pyslds/util.py", line 63, in hmm_entropy
neg_entropy += np.sum(sum_E_ztztp1T * log_transmatrix)
FloatingPointError: invalid value encountered in multiply
best andrew
The text was updated successfully, but these errors were encountered: