mattjj / pyhsmm-autoregressive

autoregressive plugin
Other
27 stars 27 forks source link

Missing function named AutoRegression in module distributions #7

Closed lishen closed 8 years ago

lishen commented 8 years ago

I'm having the following error when running the demo.py script:


AttributeError Traceback (most recent call last)

in () 9 truemodel = m.ARHSMM( 10 alpha=4.,init_state_concentration=4., ---> 11 obs_distns=[d.AutoRegression(A=A,sigma=np.eye(2)) for A in As], 12 dur_distns=[pyhsmm.basic.distributions.PoissonDuration(alpha_0=4*25,beta_0=4) 13 for state in range(len(As))], AttributeError: 'module' object has no attribute 'AutoRegression'
mattjj commented 8 years ago

What's your version of pybasicbayes? I recently updated this code so that it only works with the github version of pybasicbayes (not the pypi version installed via pip). I haven't updated the pypi version yet, though I can soon.

Try installing a more updated pybasicbayes this way:

git clone --recursive https://github.com/mattjj/pybasicbayes.git
cd pybasicbayes
pip install -e .

Let me know if you still see a problem with the updated pybasicbayes.

lishen commented 8 years ago

The problem was solved after upgrading the pybasicbayes module.

mattjj commented 8 years ago

Cool, just updated the pypi versions of pybasicbayes and pyhsmm-autoregressive so that the pip install should work.