mattjj / pyhsmm

MIT License
546 stars 173 forks source link

AttributeError: 'DiagonalGaussian' object has no attribute 'plotting_subspace_basis' #41

Closed gxhrid closed 9 years ago

gxhrid commented 9 years ago

I have add the pyhsmm and pybasicbayes package to pythonpath in the linux evn variables, like,

export PYTHONPATH=$PYTHONPATH:/home/exp/lbshmm/pyhsmm:/home/exp/lbshmm/pybasicbayes

as an alternative solution to yours in README file.(You might also want to add pyhsmm to your global Python path (e.g. by copying it to your site-packages directory).)

But when I run the sample in your samples dictatory, following error occurs.

root@bd63:/home/exp/lbshmm# python pyhsmm/examples/hsmm-possiblechangepoints.py Traceback (most recent call last): File "pyhsmm/examples/hsmm-possiblechangepoints.py", line 38, in truemodel.plot() File "/home/exp/lbshmm/pyhsmm/models.py", line 246, in plot sp1_artists = self.plot_observations(feature_ax,plot_slice=plot_slice,update=update) File "/home/exp/lbshmm/pyhsmm/models.py", line 287, in plot_observations param_artists = self._plot_2d_obs_params(ax,state_colors,update) File "/home/exp/lbshmm/pyhsmm/models.py", line 328, in _plot_2d_obs_params ax=ax, update=update,draw=False)) File "/home/exp/lbshmm/pyhsmm/basic/pybasicbayes/distributions.py", line 460, in plot plot_gaussian_projection(self.mu,self.sigma,self.plotting_subspace_basis, AttributeError: 'DiagonalGaussian' object has no attribute 'plotting_subspace_basis'

This error occurs also, when i run hsmm-possiblechangepoints-meanfield.py ,

mattjj commented 9 years ago

I just fixed this in pybasicbayes 92716c3. That name just shouldn't exist anymore; some things haven't been updated in a while.