Dear all, perhaps you could comment on what is needed to correctly compile the Cython extensions of HDDM? Background is the following: I've looked today into adding a single boundary DDM into HDDM, but have stumbled upon some issue with the Cython extensions. The reason I'm trying to do this in Cython instead of simply using an inverse Gaussian likelihood is that I want to also consider across-trial parameter variance as in Ratcliff's DDM and thought that I just reuse the existing code for numeric integration. My problem now is that I get strange/bad results when compiling the Cython extensions myself. "python setup.py develop" will produce the shared libraries just fine: cdfdif_wrapper.cpython-35m-x86_64-linux-gnu.so wfpt.cpython-35m-x86_64-linux-gnu.so (using Python 3.5 under Linux), but the example in hddm_demo.ipynb gives first unexpected warnings (see below) and sampling then stops with an AssertionError, or does not converge as expected; with posterior stds around 1 instead of 0.06 and after only 500 s. When I replace the compiled shared libraries with those pre-compiled on conda-forge, sampling seems to work and I get the expected results, but the warnings remain. Do you have any idea what could be going on? Thanks for your help! Sebastian Some more info about the setup: ------------------------------- 64-bit Linux Mint 17.3 installed linux packages: gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 gfortran (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 liblapack-dev 3.5.0-2ubuntu1 libblas-dev 1.2.20110419-7 (not python-scipy as this should come from conda, right?) conda env with: python=3.5 seaborn pandas spyder jupyter pymc cython patsy kabuki as git submodule in hddm installed with 'python setup.py develop' print(hddm.__version__) print(kabuki.__version__) print(pm.__version__) 0.6.1 0.6.2 2.3.6 Warning after the call of 'm = hddm.HDDM(data)', 'm.find_starting_values()': ---------------------------------------------------------------------------- /home/bitzer/programs/anaconda/envs/hddm-dev/lib/python3.5/site-packages/scipy/optimize/optimize.py:1876: RuntimeWarning: invalid value encountered in double_scalars tmp2 = (x - v) * (fx - fw) /home/bitzer/programs/anaconda/envs/hddm-dev/lib/python3.5/site-packages/scipy/optimize/optimize.py:1877: RuntimeWarning: invalid value encountered in double_scalars p = (x - v) * tmp2 - (x - w) * tmp1 /home/bitzer/programs/anaconda/envs/hddm-dev/lib/python3.5/site-packages/pymc/Node.py:403: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future self.__name__ = input['__name__'] AssertionError encountered with compiled Cython extensions: ----------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-4-024ebc1556d4> in <module>() 5 m.find_starting_values() 6 # start drawing 7000 samples and discarding 5000 as burn-in ----> 7 m.sample(2000, burn=20) /home/bitzer/ZIH/gitrepos/hddm/kabuki/kabuki/hierarchical.py in sample(self, *args, **kwargs) 649 650 # sample --> 651 self.mc.sample(*args, **kwargs) 652 653 self.sampled = True /home/bitzer/programs/anaconda/envs/hddm-dev/lib/python3.5/site-packages/pymc/MCMC.py in sample(self, iter, burn, thin, tune_interval, tune_throughout, save_interval, burn_till_tuned, stop_tuning_after, verbose, progress_bar) 277 278 # Run sampler --> 279 Sampler.sample(self, iter, length, verbose) 280 281 def _loop(self): /home/bitzer/programs/anaconda/envs/hddm-dev/lib/python3.5/site-packages/pymc/Model.py in sample(self, iter, length, verbose) 249 # Loop 250 self._current_iter = 0 --> 251 self._loop() 252 self._finalize() 253 /home/bitzer/programs/anaconda/envs/hddm-dev/lib/python3.5/site-packages/pymc/MCMC.py in _loop(self) 313 print_('Step method %s stepping' % step_method._id) 314 # Step the step method --> 315 step_method.step() 316 317 # Record sample to trace, if appropriate /home/bitzer/ZIH/gitrepos/hddm/kabuki/kabuki/step_methods.py in step(self) 395 iter += 1 396 --> 397 assert iter < self.maxiter, "Step-out procedure failed" 398 self.neval += iter 399 if self.verbose>2: AssertionError: Step-out procedure failed
--
You received this message because you are subscribed to the Google Groups "hddm-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hddm-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to hddm-users+...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to hddm-users+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to hddm-users+...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to hddm-users+unsubscribe@googlegroups.com.
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-7-024ebc1556d4> in <module>()
5 m.find_starting_values()
6 # start drawing 7000 samples and discarding 5000 as burn-in
----> 7 m.sample(2000, burn=20)
C:\Users\Mike\Anaconda3\lib\site-packages\kabuki\hierarchical.py in sample(self, *args, **kwargs)
649
650 # sample
--> 651 self.mc.sample(*args, **kwargs)
652
653 self.sampled = True
C:\Users\Mike\Anaconda3\lib\site-packages\pymc\MCMC.py in sample(self, iter, burn, thin, tune_interval, tune_throughout, save_interval, burn_till_tuned, stop_tuning_after, verbose, progress_bar)
277
278 # Run sampler
--> 279 Sampler.sample(self, iter, length, verbose)
280
281 def _loop(self):
C:\Users\Mike\Anaconda3\lib\site-packages\pymc\Model.py in sample(self, iter, length, verbose)
249 # Loop
250 self._current_iter = 0
--> 251 self._loop()
252 self._finalize()
253
C:\Users\Mike\Anaconda3\lib\site-packages\pymc\MCMC.py in _loop(self)
313 print_('Step method %s stepping' % step_method._id)
314 # Step the step method
--> 315 step_method.step()
316
317 # Record sample to trace, if appropriate
C:\Users\Mike\Anaconda3\lib\site-packages\kabuki\step_methods.py in step(self)
395 iter += 1
396
--> 397 assert iter < self.maxiter, "Step-out procedure failed"
398 self.neval += iter
399 if self.verbose>2:
AssertionError: Step-out procedure failed
[-----------------100%-----------------] 10001 of 10000 complete in 5404.8 secCould not generate output statistics for t
Could not generate output statistics for t_subj.5
Could not generate output statistics for
v_subj(WW).7
(errors are given for all participants/parameters)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-9-191835b0b46f> in <module>()
1 m_stim = hddm.HDDM(data, depends_on={'v': 'stim'})
2 m_stim.find_starting_values()
----> 3 m_stim.sample(10000, burn=1000)
C:\Users\Mike\Anaconda3\lib\site-packages\kabuki\hierarchical.py in sample(self, *args, **kwargs)
653 self.sampled = True
654
--> 655 self.gen_stats()
656 return self.mc
657
C:\Users\Mike\Anaconda3\lib\site-packages\kabuki\hierarchical.py in gen_stats(self, fname, print_hidden, **kwargs)
730 print_hidden <bool> - print statistics of hidden nodes
731 """
--> 732 self.append_stats_to_nodes_db()
733
734 sliced_db = self.nodes_db.copy()
C:\Users\Mike\Anaconda3\lib\site-packages\kabuki\hierarchical.py in append_stats_to_nodes_db(self, *args, **kwargs)
782 if self.nodes_db.loc[name, 'hidden']:
783 continue
--> 784 self.nodes_db.loc[name, 'mean'] = i_stats['mean']
785 self.nodes_db.loc[name, 'std'] = i_stats['standard deviation']
786 self.nodes_db.loc[name, '2.5q'] = i_stats['quantiles'][2.5]
TypeError: 'NoneType' object
[-----------------100%-----------------] 2001 of 2000 complete in 209.9 secCould not generate output statistics for v_subj.12
Could not generate output statistics for a_subj.11
Could not generate output statistics for v_subj.8
Could not generate output statistics for v_subj.1
Could not generate output statistics for a_std
Could not generate output statistics for v_subj.13
Could not generate output statistics for a_subj.13
Could not generate output statistics for v_subj.0
Could not generate output statistics for t_std
Could not generate output statistics for a_subj.6
Could not generate output statistics for v
Could not generate output statistics for a_subj.0
Could not generate output statistics for a
Could not generate output statistics for v_subj.7
Could not generate output statistics for t_subj.11
Could not generate output statistics for a_subj.1
Could not generate output statistics for a_subj.2
Could not generate output statistics for a_subj.12
Could not generate output statistics for t_subj.1
Could not generate output statistics for a_subj.3
Could not generate output statistics for t_subj.8
Could not generate output statistics for a_subj.4
Could not generate output statistics for v_subj.4
Could not generate output statistics for a_subj.8
Could not generate output statistics for v_subj.6
Could not generate output statistics for t_subj.10
Could not generate output statistics for t_subj.0
Could not generate output statistics for a_subj.5
Could not generate output statistics for t_subj.4
Could not generate output statistics for t_subj.12
Could not generate output statistics for a_subj.9
Could not generate output statistics for t_subj.13
Could not generate output statistics for t_subj.5
Could not generate output statistics for t
Could not generate output statistics for a_subj.10
Could not generate output statistics for v_subj.5
Could not generate output statistics for v_subj.9
Could not generate output statistics for t_subj.6
Could not generate output statistics for v_std
Could not generate output statistics for v_subj.3
Could not generate output statistics for v_subj.2
Could not generate output statistics for v_subj.10
Could not generate output statistics for t_subj.9
Could not generate output statistics for v_subj.11
Could not generate output statistics for a_subj.7
Could not generate output statistics for t_subj.2
Could not generate output statistics for t_subj.7
Could not generate output statistics for t_subj.3
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-7-ec7a26b34f7f> in <module>()
6 m.find_starting_values()
7 # start drawing 7000 samples and discarding 5000 as burn-in
----> 8 m.sample(2000, burn=20)
C:\Users\Mike\Anaconda3\lib\site-packages\kabuki\hierarchical.py in sample(self, *args, **kwargs)
653 self.sampled = True
654
--> 655 self.gen_stats()
656 return self.mc
657
C:\Users\Mike\Anaconda3\lib\site-packages\kabuki\hierarchical.py in gen_stats(self, fname, print_hidden, **kwargs)
730 print_hidden <bool> - print statistics of hidden nodes
731 """
--> 732 self.append_stats_to_nodes_db()
733
734 sliced_db = self.nodes_db.copy()
C:\Users\Mike\Anaconda3\lib\site-packages\kabuki\hierarchical.py in append_stats_to_nodes_db(self, *args, **kwargs)
782 if self.nodes_db.loc[name, 'hidden']:
783 continue
--> 784 self.nodes_db.loc[name, 'mean'] = i_stats['mean']
785 self.nodes_db.loc[name, 'std'] = i_stats['standard deviation']
786 self.nodes_db.loc[name, '2.5q'] = i_stats['quantiles'][2.5]
TypeError: 'NoneType' object is not subscriptable
To unsubscribe from this group and stop receiving emails from it, send an email to hddm-users+...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to hddm-users+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to hddm-users+unsubscribe@googlegroups.com.
tmp2 = (x - v) * (fx - fw)"
I'm not sure if I understood all of this conversation correctly, but running "pip install -U --no-deps git+https://github.com/hddm-devs/hddm" did not help in my case.
As I'm a total beginner with hddm, and don't have much experience with python, I have absolutely no clue what could possibly be wrong, so I'll appreciate any hints!
To unsubscribe from this group and stop receiving emails from it, send an email to hddm-users+unsubscribe@googlegroups.com.
conda install python=3.3To unsubscribe from this group and stop receiving emails from it, send an email to hddm-users+unsubscribe@googlegroups.com.
ShimWarning: The `IPython.parallel` package has been deprecated since IPython 4.0. You should import from ipyparallel instead. "You should import from ipyparallel instead.", ShimWarning)
model.find_starting_values()tmp2 = (x - v) * (fx - fw)
model.sample(2000, burn=20)
VisibleDeprecationWarning: u
sing a non-integer number instead of an integer will result in an error in the future self.__name__ = input['__name__']
To unsubscribe from this group and stop receiving emails from it, send an email to hddm-users+unsubscribe@googlegroups.com.