Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework Initial Infections and Support Exponential Growth Initializati…
…ons (#124) * Working on Rt docs * Starting off module * Adding test and starting tutorial * Removing extra file * Starting work on InfectionSeedingProccess and InfectionsSeedingMethod * ignore lack of docs while developing * clarify problems with pad * rework so n_timepoints is an attribute of SeedInfectionsMethod * use exceptions instead of assertions * fixing issues with sampling for infection_seeding_process * start to rework getting-started.qmd * Make rate a RandomVariable and fix SeedInfectionsZeroPad * fix TODO tag * Tutorial code working (text not updated) * Adding a test and extending documentation * Adding test for datautils * Adding more content to the tutorial * Adding a test checking for the calculations of the double conv (expected to fail) * Update model/src/test/test_infectionsrtfeedback.py * Clarify variable names in sample_infections_with_feedback() * Sign consistency and documentation * Add basic test that infections with feedback reduces to regular infections with zero-strength feedback, and returns the R(t) timeseries correctly * Add pytest-mpl to pyproject.toml given use of @pytest.mark.mpl_image_compare in tests * Run precommit * Clarify pmf input format for sample_infections_with_feedback in documentation * Update lockfile, style infections.py * clarify use of reversed PMFs, remove padding operations that should not occur * Harmonize indexing and remove autopadding; fix manual renewal process implementation. This will break other tests but is a worthwhile breaking change * Update latent admissions test * Fixing broken tests * Cleanup infection seeding * Cleanup infection seeding * Adding needed padding for convo * fix for I0 size * update tutorials * trying something * report all latent infections, including latent onces * Adding direction of padding to the docs * use jnp.atleast_1d * Change default tol in DeterministicPMF to work on macOS * Namespaces * Adding missing note * Update model/src/test/test_model_basic_renewal.py Co-authored-by: Dylan H. Morris <dylanhmorris@users.noreply.github.com> * Splitting tests and using pytest.raises * Removing unnecesary call to test_* * Update model/src/test/test_datautils.py Co-authored-by: Dylan H. Morris <dylanhmorris@users.noreply.github.com> * Fixing tests and adding test for Infections.sample() raise error * Fixing tutorial using old name of sample_infections * Fixing docstring (missing r""") * Deleting call to test * inf_feedback: either len 1 or len Rt (otherwise error) * Replacing I0 for DistributionalRVSample * Replacing I0 for DistributionalRVSample (vis) * Ensuring DeterministicRV/DistributionalRV.sample returns at least 1d array * Apply suggestions from code review @damonbayer Co-authored-by: Damon Bayer <xum8@cdc.gov> * Fixing pre-commit * Cherry pick when ghost was fixed * Cherry pick data utils * New metaclass.DistributionalRV (#138) * New metaclass.DistributionalRV * Update model/src/pyrenew/metaclass.py Co-authored-by: Dylan H. Morris <dylanhmorris@users.noreply.github.com> * Update model/src/pyrenew/metaclass.py Co-authored-by: Dylan H. Morris <dylanhmorris@users.noreply.github.com> * Update model/src/pyrenew/metaclass.py Co-authored-by: Dylan H. Morris <dylanhmorris@users.noreply.github.com> * Update model/src/pyrenew/latent/i0.py Co-authored-by: Dylan H. Morris <dylanhmorris@users.noreply.github.com> * Update model/src/pyrenew/latent/i0.py Co-authored-by: Dylan H. Morris <dylanhmorris@users.noreply.github.com> * Removing latent.Infections0 * Replacing the InfectHospRate class with DistributionalRV --------- Co-authored-by: Dylan H. Morris <dylanhmorris@users.noreply.github.com> * Removing residual comments from conflicts * update example-with-dataset to use exponential initialization * update default t_I_pre_seed for SeedInfectionsExponential * update example-with-datasets to use default t_I_pre_seed * docs * Put infection functions back in website documentation * add testing from InfectionSeedMethods and InfectionSeedProcess * Clean up qmd's * fix tests in test_infection_seeding_method * fix test in test_infection_seeding_process * fix test in test_infectionsrtfeedback * typo in admissionsmodel * starting to fix model test * starting to fix tutorials * formatting quarto docs * fix test_model_basic_renewal * most tests working * fix extending_pyrenew * all tests passing * revise test_model_basicrenewal_plot.png * cleanup test_model_hospitalizations * relax test_seed_infections_exponential * relax test_infection_seeding_method further * trying plot from ubuntu to see if it fixes CI * typo * Apply suggestions from code review Co-authored-by: Dylan H. Morris <dylanhmorris@users.noreply.github.com> * Updating image * Making precommit happy * correct latent.rst * Apply suggestions from code review Co-authored-by: Dylan H. Morris <dylanhmorris@users.noreply.github.com> * format arrayutils * Apply suggestions from code review Co-authored-by: Dylan H. Morris <dylanhmorris@users.noreply.github.com> * fix styling * add name to infection_seeding_process * clean up infections.py * fix docstring for I0 on infectionswithfeedback * add test for padding a non-scalar array * additional tests for exponential seeding method * fix quarto docs * remove datautils * rename test_datautils.py to test_arrayutils.py * add tests for arrayutils * add tests to make codecov happy * fix tests * fix test * attempt to make codecov happy * fix math rendering --------- Co-authored-by: George G. Vega Yon <xrd4@cdc.gov> Co-authored-by: George G. Vega Yon <g.vegayon@gmail.com> Co-authored-by: Dylan H. Morris <dzl1@cdc.gov> Co-authored-by: Dylan H. Morris <dylanhmorris@users.noreply.github.com>
- Loading branch information