You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do we want all parameters in a single dictionary or separate e.g. theory_params and bias_params?
If they are all in one dictionary we cannot (easily) give each function just the parameters it wants -- this is relevant if models complain if they get too many parameters
If they are separated it is difficult to handle parameters used by theory and bias model (are there any?)
Should a function care if it gets too many (i.e. wrong) parameters?
If they do they can check if any parameters are left over
Doesn't work well with single param dictionary, theory would need to give list of parameters it needs
Doesn't work well if different theory models require different parameters
Should parameters be keyword arguments (**kwargs) or dictionaries?
Keywords have stricter naming rules (you can have dictionary keys '100*theta_s', that can't be an argument)
Keywords allow you to know what parameters a function expects [but this is hard to use in an automated way!]
The likelihood could not distinguish keyword arguments meant for theory or bias model
We probably want to copy() (or deepcopy()) the dictionaries before we pass them to functions, especially if we reuse them. Otherwise an external function (e.g. theory_func) messing up parameters is very annoying to debug, in my experience ;)
The text was updated successfully, but these errors were encountered:
It seems like we are going with dictionaries because it allows for us to more easily pass separate chunks of paramters (lets us distinguish between nuisance and astrophysical params for example).
We are going to leave parameter checking to the theory function (add a docstring warning the users).
Do we want all parameters in a single dictionary or separate e.g. theory_params and bias_params?
Should a function care if it gets too many (i.e. wrong) parameters?
Should parameters be keyword arguments (**kwargs) or dictionaries?
We probably want to
copy()
(ordeepcopy()
) the dictionaries before we pass them to functions, especially if we reuse them. Otherwise an external function (e.g. theory_func) messing up parameters is very annoying to debug, in my experience ;)The text was updated successfully, but these errors were encountered: