BAMresearch / bayem

Implementation and derivation of "Variational Bayesian inference for a nonlinear forward model." [Chappell et al. 2008] for arbitrary, user-defined model errors.
MIT License
2 stars 1 forks source link

evaluate vs. __call__ #20

Closed joergfunger closed 3 years ago

joergfunger commented 3 years ago

The inference problem currently only has a __call_function that returns a dictionary (for the experiment) of vectors (concatenation of all sensor outputs). I think it would be nice to have an interface that allows to propagate the complete model error to the output, thus a function that returns a dictionary (experiment) of dictionaries (sensors) - which I could implement. Just asking myself, if we still need the call function (so that I would just change call) and then have another helper function on the top level of the inference problem (so not implementing an evaluate and call in parallel in all classes like ModelError and ForwardModel). I think in these classes a single call returning the dict of dict version would be sufficient, and then we provide an evaluate_as_vector function in the inferenceProblem.

joergfunger commented 3 years ago

I think I misinterpreted the current implementation, the call function already returns a dict of OrderedDict.