This PR represents a major overhaul of the marginal calculation for all models. In place of the current implementation, the joint density with the likelihood is calculated first. The marginals are then obtained by integrating over this 2-dimensional joint density. Normalisation and integrals are calculated using scipy.integrate functions. This leads to a significantly improved prediction accuracy and a theoretically well-supported computationally procedure. Prior distributions are now enforced in all models.
Other changes:
Hellinger_distances and relative_entropy are no longer calculated point-wise
plot_prob_density is now xarray facet-grid compatible and supports plotting variables onto rows and columns. It has been renamed to .plot.facet_grid.density, in line with the dantro naming scheme
sigma kwarg to plot_prob_density is now smoothing
Performance_analysis config of HarrisWilson has been removed; most synthetic datasets from HarrisWilson have also been removed
Parameters and losses are now stored in a consistent way across models
Changes and improvements to the Harris-Wilson and SIR models: the publications from the PNAS paper are now no longer exactly reproduced, but a better overview of the predicted densities is shown
:warning: Major commit :warning: Breaking change
Overview
This PR represents a major overhaul of the marginal calculation for all models. In place of the current implementation, the joint density with the likelihood is calculated first. The marginals are then obtained by integrating over this 2-dimensional joint density. Normalisation and integrals are calculated using
scipy.integrate
functions. This leads to a significantly improved prediction accuracy and a theoretically well-supported computationally procedure. Prior distributions are now enforced in all models.Other changes:
Hellinger_distances
andrelative_entropy
are no longer calculated point-wiseplot_prob_density
is now xarray facet-grid compatible and supports plotting variables onto rows and columns. It has been renamed to.plot.facet_grid.density
, in line with the dantro naming schemesigma
kwarg toplot_prob_density
is nowsmoothing
Performance_analysis
config ofHarrisWilson
has been removed; most synthetic datasets fromHarrisWilson
have also been removedCan this PR be accepted?