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
I installed hddm in a blank conda environment with Python 3.7 as recommended in the installation guide.
I followed the exact instructions specified in the repo's readme.
Code
The most minimal example where I managed to reproduce the error was training a simple HDDM model on my training data without any regression or depends_on arguments (But I have to mention that I encountered the same error trying to use HDDMRegressor and HDDMnnRegressor too).
import hddm
import pandas as pd
# This is a dataframe containing:
# - subj_idx: str - subject ids
# - rt: float - Reaction times in seconds
# - response: float - 0.0 on incorrect responses, 1.0 on correct responses.
dat = pd.read_csv("<filename>.csv")
model = hddm.HDDM(dat)
model.find_starting_values()
model.sample(1000, burn=1000)
Expected behaviour
The posterior is sampled without issue and output statistics are correctly calculated.
Actual behaviour
Sampling runs, but output statistics cannot be generated.
output:
/home/au689890/anaconda3/envs/hddm/lib/python3.7/site-packages/scipy/optimize/optimize.py:2215: RuntimeWarning: invalid value encountered in double_scalars
tmp2 = (x - v) * (fx - fw)
[-----------------100%-----------------] 1001 of 1000 complete in 80.5 sec
Could not generate output statistics for t
Could not generate output statistics for t_subj.<subject id>
...
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-7-4c77a0dec535> in <module>
1 # %%
2 ddm.find_starting_values()
----> 3 ddm.sample(1000, burn=1000)
~/anaconda3/envs/hddm/lib/python3.7/site-packages/kabuki/hierarchical.py in sample(self, *args, **kwargs)
661 self.sampled = True
662
--> 663 self.gen_stats()
664 return self.mc
665
~/anaconda3/envs/hddm/lib/python3.7/site-packages/kabuki/hierarchical.py in gen_stats(self, fname, print_hidden, **kwargs)
739 """
740
--> 741 self.append_stats_to_nodes_db()
742
743 sliced_db = self.nodes_db.copy()
~/anaconda3/envs/hddm/lib/python3.7/site-packages/kabuki/hierarchical.py in append_stats_to_nodes_db(self, *args, **kwargs)
791 if self.nodes_db.loc[name, 'hidden']:
792 continue
--> 793 self.nodes_db.loc[name, 'mean'] = i_stats['mean']
794 self.nodes_db.loc[name, 'std'] = i_stats['standard deviation']
795 self.nodes_db.loc[name, '2.5q'] = i_stats['quantiles'][2.5]
TypeError: 'NoneType' object is not subscriptable
The text was updated successfully, but these errors were encountered:
Preparation
I installed hddm in a blank conda environment with Python 3.7 as recommended in the installation guide.
I followed the exact instructions specified in the repo's readme.
Code
The most minimal example where I managed to reproduce the error was training a simple HDDM model on my training data without any regression or depends_on arguments (But I have to mention that I encountered the same error trying to use HDDMRegressor and HDDMnnRegressor too).
Expected behaviour
The posterior is sampled without issue and output statistics are correctly calculated.
Actual behaviour
Sampling runs, but output statistics cannot be generated.
output:
The text was updated successfully, but these errors were encountered: