Closed mattjj closed 11 years ago
--------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-73-5ba20912374f> in <module>() 1 reload(pymouse) 2 lhsmmModel = pymouse.lhsmm.LHSMM(means, sigmas) ----> 3 lhsmmModel.fit(data) /home/alexbw/Code/pymouse/lhsmm.py in fit(self, X, y) 161 print "Burning in the model (%d burn-in iterations)" % self.n_iter_burnin 162 for itr in progprint_xrange(self.n_iter_burnin): --> 163 self.hsmm_model.resample_model() 164 165 # Then, Gibbs sampling /home/alexbw/Code/pyhsmm/models.pyc in resample_model(self, **kwargs) 467 def resample_model(self,**kwargs): 468 self.resample_dur_distns() --> 469 super(HSMM,self).resample_model(**kwargs) 470 471 def resample_dur_distns(self): /home/alexbw/Code/pyhsmm/models.pyc in resample_model(self, **kwargs) 166 # TODO TODO pass temp to resample_states 167 def resample_model(self,**kwargs): --> 168 self.resample_obs_distns(**kwargs) 169 self.resample_trans_distn() 170 self.resample_init_state_distn() /home/alexbw/Code/pyhsmm/plugins/pyhsmm_library_models/library_models.pyc in resample_obs_distns(self, **kwargs) 241 distn.resample_from_likelihoods( 242 [s._likelihoods[s.stateseq == state] for s in self.states_list], --> 243 **kwargs) 244 self._clear_caches() 245 /home/alexbw/Code/pyhsmm/plugins/pyhsmm_library_models/library_models.pyc in resample_from_likelihoods(self, data_likelihoods, niter, temp) 64 scores /= temp 65 ---> 66 z = sample_discrete_from_log_2d_destructive(scores) 67 68 if hasattr(self.weights,'resample_just_weights'): /home/alexbw/Code/pyhsmm/util/stats.pyc in sample_discrete_from_log_2d_destructive(scores, dtype) 110 headers=['<Eigen/Core>','<math.h>'],include_dirs=[eigen_path], 111 extra_compile_args=['-O3','-DNDEBUG']) --> 112 assert (0 <= out).all() and (out < scores.shape[1]).all() 113 return out 114 AssertionError:
Fixed in pyhsmm and pulled into this repo in 5107e9a.