You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Solve for the equilibrium state
p_equilibrium = solve_equilibrium(n_states, p_transition)
obs_states = HMMStates(
"states",
p_transition=p_transition,
p_equilibrium=p_equilibrium,
n_states=n_states,
observed=np.array(states).astype("float")
)
it gets stack saying "Chain 0 failed."
If I run prior checks I manage to get samples for the "p_transition" but for "states", I get the following error:
'HMMStates' object has no attribute 'p'
I guess the problems are related.
Those are the versions:
numpy == 1.19.1
theano == 1.0.4
pymc3 == 3.9.3
Thanks a lot in advance for your help.
Vincenzo
The text was updated successfully, but these errors were encountered:
That one should execute from top to bottom with no Python class definition issues.
There's some things that need improvement, btw, such as the log-likelihood calculation being marginalized over every possible state (something that isn't done in the code). I've been working on that with an intern at work, and we'll be releasing it sometime near the end of the year once he's done with his internship.
Dear Eric,
thanks a lot for a great post HMM in pymc3 (https://ericmjl.github.io/essays-on-data-science/machine-learning/markov-models/). I am writing a thesis in associative learning and I would like to integrate part of your model into my simulations. The problem is that when I run the sampler for
n_states = 3
with pm.Model() as model:
p_transition = pm.Dirichlet(
"p_transition",
a=tt.ones((n_states, n_states)) * 4, # weakly informative prior
shape=(n_states, n_states))
it gets stack saying "Chain 0 failed."
If I run prior checks I manage to get samples for the "p_transition" but for "states", I get the following error:
'HMMStates' object has no attribute 'p'
I guess the problems are related.
Those are the versions:
numpy == 1.19.1
theano == 1.0.4
pymc3 == 3.9.3
Thanks a lot in advance for your help.
Vincenzo
The text was updated successfully, but these errors were encountered: