ampere is primarily designed around a DI pattern, even though I didn't know that's what is was when we started - Model and Data instances are dependencies that are injected into the inference objects as attributes. This can be extended to 'DI all the way down', which will particularly make Data classes much more flexible. At minimum, Data classes would have the following mandatory dependences,
Data-generating process (i.e. how do you go from the model to a noise-free observable);
Noise model (i.e. how to you characterise the covariances of the data);
Likelihood (i.e. how are data distributed given 1 and 2);
plus some optional things like plotting, reading and writing data, but it might be possible to cover some of that through clever defaults.
We can take advantage of work on this issue to also contribute to https://github.com/ICSM/ampere/issues/67 and convert everything to instances of the equivalent of Modules in one of the JAX modelling libraries, making it easier to track things, optimise code and run more advanced inference algorithms.
ampere
is primarily designed around a DI pattern, even though I didn't know that's what is was when we started -Model
andData
instances are dependencies that are injected into the inference objects as attributes. This can be extended to 'DI all the way down', which will particularly makeData
classes much more flexible. At minimum,Data
classes would have the following mandatory dependences,plus some optional things like plotting, reading and writing data, but it might be possible to cover some of that through clever defaults.
We can take advantage of work on this issue to also contribute to https://github.com/ICSM/ampere/issues/67 and convert everything to instances of the equivalent of
Module
s in one of the JAX modelling libraries, making it easier to track things, optimise code and run more advanced inference algorithms.