flo-schu / pymob

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

Improve parameter parsing from config file #18

Open flo-schu opened 7 months ago

flo-schu commented 7 months ago

This should be implemented once the new config module (#3) has been merged. I should think about abandoning the Param class from toopy.

new parser

flo-schu commented 3 weeks ago

Parameters in the pydantic backend are handled as numpy NDarray types, so they can have an arbitrary shape. Parameters contain a prior field that contains a string for a distribution, which should follow scipy distributions, and an ast.Expression for the parameters. This is because at the point of definition, the values of the parameters may not be known. Therefore they are parsed as part of the prior definition, but evaluated with a specific context later only when used.