This is a follow up question from How to slice an array of numbers during fitting
In that post I created fake array data and was able to execute code. However I am now using real data which have different lengths so I have to use a list.
This list of data with rows of different lengths. All elements in each row must be greater than a different row number.
with pm.Model() as model_b:
tau = pm.Normal(‘tau’, mu = 2, sd=2)
ϵ = pm.HalfCauchy(‘ϵ’, 5)
#Observed active_ = a > tau * b
active should return [[False, True, True],[False,True,True,True]]
It returns a single value of False
# Likelihood μ = pm.Deterministic('μ', pm.math.sum(a*active_)) kill_pred = pm.Normal('kill_pred', mu=μ, sd=ϵ, observed=kill) trace_b = pm.sample()
Is there a way to get around this? Thank you!