Hi @aseyboldt and @junpenglao,
I’m trying to use this Ordered() class to order a Mixture of Uniform Distributions.
I not sure its relevent, but the application is to find the true onset of an “spindle” event (0-25 seconds) from the estimates of a number of noisy human raters, each with differing expertise. I’m also trying to infer there expertise by considering how close each rater is to the inferred true onset.
My code is as follows:
max_spindles_per_epoch = 6
expected_std_for_accuracy = 0.2
n_r = data['rater_i'].max()+1
#set up model
with pm.Model() as model:
BoundedNormal = pm.Bound(pm.Normal, lower=0)
p = pm.Dirichlet('p', a=np.ones(max_spindles_per_epoch)) #proportion of rater spindles to each real spindle. Uniform.
gss = pm.Uniform('gss', lower=0, upper=25, shape=max_spindles_per_epoch, transform=Ordered(),
testval=np.linspace(0, 25, max_spindles_per_epoch)) # Real spindles
comp_dists = gss.distribution
comp_dists.mode = 12.5 #hack, https://discourse.pymc.io/t/how-to-use-a-densitydist-in-a-mixture/1371/2
s = pm.Mixture('m_s', w=p, comp_dists=comp_dists)
rater_expertise = BoundedNormal('r_E', mu=expected_std_for_accuracy, sd=0.25, shape=n_r)
raters_spindle_location = pm.Normal('raters_spindle_location',
mu=s,
sd=rater_expertise[data['rater_i']],
observed=data['raters_spindle_location'])
return model
Unfortunately, I’m getting an error with no real message returned:
Initializing NUTS using jitter+adapt_diag...
Multiprocess sampling (2 chains in 2 jobs)
NUTS: [r_E, m_s, gss, p]
Sampling 2 chains: 0%| | 0/2000 [00:00<?, ?draws/s]forrtl: error (200): program aborting due to control-C event
Image PC Routine Line Source
libifcoremd.dll 00007FFF10EA94C4 Unknown Unknown Unknown
KERNELBASE.dll 00007FFF668356FD Unknown Unknown Unknown
KERNEL32.DLL 00007FFF6A1A3034 Unknown Unknown Unknown
ntdll.dll 00007FFF6A3A1461 Unknown Unknown Unknown
forrtl: error (200): program aborting due to control-C event
Image PC Routine Line Source
libifcoremd.dll 00007FFF10EA94C4 Unknown Unknown Unknown
KERNELBASE.dll 00007FFF668356FD Unknown Unknown Unknown
KERNEL32.DLL 00007FFF6A1A3034 Unknown Unknown Unknown
ntdll.dll 00007FFF6A3A1461 Unknown Unknown Unknown
forrtl: error (200): program aborting due to control-C event
Image PC Routine Line Source
libifcoremd.dll 00007FFF10EA94C4 Unknown Unknown Unknown
KERNELBASE.dll 00007FFF668356FD Unknown Unknown Unknown
KERNEL32.DLL 00007FFF6A1A3034 Unknown Unknown Unknown
ntdll.dll 00007FFF6A3A1461 Unknown Unknown Unknown
Process finished with exit code 0
What can i do to track this error, or have i missspecified my model somehow?
Thanks!!