Hello all. I have a pretty complicated model that I fit with quite a lot of data that takes a really long time to fit (it spends ~24 hours for 100 iterations for a small subset of subjects). I want to implement multithreading with map_rect
to make it run faster, but I am unsure what is the right way of doing it given the unusual structure of my model:
model {
// model 1
for (1:A) {
y_A ~ bernouli(theta1)
}
// model 2
for (1:B) {
y_B ~ bernouli(theta2)
}
// model 3
for (1:C) {
y_C ~ bernouli(theta3)
}
// model n
for (1:N) {
y_N ~ bernouli(thetaN)
}
}
where every model (from model 1 to model n) has a different structure and different input data.
Should I map_rect
over the full set of models? Should I do it for each model separately? Any direction will be helpful!
Thanks!