hddm-devs / hddm

HDDM is a python module that implements Hierarchical Bayesian parameter estimation of Drift Diffusion Models (via PyMC).
http://ski.clps.brown.edu/hddm_docs/
Other
261 stars 117 forks source link

problem with generating posterior preditions #70

Open dokato opened 3 years ago

dokato commented 3 years ago

I had trouble running hddm.utils.post_pred_gen on my data.

I got:

    942 
    943         if len(data_nodes) != 1:
--> 944             raise NotImplementedError("Supply a grouping so that at most 1 observed node codes for each group.")
    945 
    946         return data_nodes[0]

NotImplementedError: Supply a grouping so that at most 1 observed node codes for each group.

The intermediate solution is to reset indices of the input data if you filter out some trials.

data.reset_index(inplace = True, drop = True)