lnccbrown / HSSM

Development of HSSM package
Other
71 stars 10 forks source link

Bug in Main Tutorial #399

Closed gingjehli closed 1 month ago

gingjehli commented 2 months ago

I've tried to run the following code from the main tutorial and got an error message below:

from ssms.basic_simulators import simulator import numpy as np import pandas as pd

Specify parameters

v_true, a_true, z_true, t_true = [0.5, 1.5, 0.5, 0.2]

Simulate data

sim_out = simulator( theta=[v_true, a_true, z_true, t_true], # parameter list model="ddm", # specify model (many are included in ssms) n_samples=500, # number of samples for each set of parameters )


TypeError Traceback (most recent call last) Cell In[31], line 10 6 v_true, a_true, z_true, t_true = [0.5, 1.5, 0.5, 0.2] 9 # Simulate data ---> 10 sim_out = simulator( 11 theta=[v_true, a_true, z_true, t_true], # parameter list 12 model="ddm", # specify model (many are included in ssms) 13 n_samples=500, # number of samples for each set of parameters 14 )

TypeError: 'module' object is not callable

gingjehli commented 2 months ago

just to add: the term "simulator" is missing before "simulator". It should be:

sim_out = simulator.simulator(

digicosmos86 commented 2 months ago

Thanks @gingjehli! Yeah the ssms package has gone through some updates but the main tutorial has not really been updated. It's probably due for some updates since other new features have been added too.

AlexanderFengler commented 2 months ago

Thanks @gingjehli ,

we made some improvements to ssms which changed the module structure slightly, that where this is coming from. Will fix the tutorial.