flo-schu / pymob

Python model building platform
MIT License
0 stars 0 forks source link

Allow to pass y0 directly to the evaluator #37

Open flo-schu opened 3 months ago

flo-schu commented 3 months ago

This is actually already implemented through parameters. Only in the initialize method. y0 is fixed. This is not ideal, because without this I could wrap the call to the solver and likelihood computation in a numpyro.plate notation. This is somewhat more involved, because it requires changing coordinates with the updated y0. By default, y0 is the full y0, which matches the coordinates. One way to implement this would be to infer the coordinates from y0, but this would conflict with numpyro to accept only Arrays. Then again, it would also be a common pattern to paramterize the solver with model, time, y0 + static arguments, which would suffice for the current solver.

This feature would also be helpful for interpolating or extrapolating posterior predictions

⚠ This is a big issue.