Initialisation model and improved unit testing for distributions #74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Main change
This PR makes a simple
initialize_incidence
Turing
model constructor available, but doesn't implement using it. This is because we are likely to refactor the API from this point.Minor change
Unit tests on distributional usage were relying on direct analytic solutions; to speed this up I've added
HypothesisTests
as a dependency to the test environment (not the package environment).Usage
EpiAware
functions are compared against the expected distribution using a Kolmogorov-Smirnov testHypothesisTests.ExactOneSampleKSTest
e.g here.EpiAware
functions are compared against the expected distribution by also generating samples from the expected distribution and comparing two sample averages using one way ANOVAHypothesisTests.OneWayANOVATest
, and variance using a F testHypothesisTests.VarianceFTest
. Implementation example here.For hypothesis tests the test fails at
p < 1e-6
, e.g. if there is a correctly implemented test the failure chance is one-in-a-million. Typically, this means that sampling from the model should be in order of a few thousand to avoid potential false passes.