diff --git a/README.md b/README.md index f8216081..0f26eede 100755 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ pip install git+https://github.com/CDCgov/PyRenew@main ## Models Implemented With PyRenew -- [CDCgov/pyrenew-covid-wastewaterpyrenew-covid-wastewater](https://github.com/CDCgov/pyrenew-covid-wastewater): _Models and infrastructure for forecasting COVID-19 hospitalizations using wastewater data with PyRenew._ +- [CDCgov/pyrenew-covid-wastewater](https://github.com/CDCgov/pyrenew-covid-wastewater): _Models and infrastructure for forecasting COVID-19 hospitalizations using wastewater data with PyRenew._ - [CDCgov/pyrenew-flu-light](https://github.com/CDCgov/pyrenew-flu-light/): _An instantiation in PyRenew of an influenza forecasting model used in the 2023-24 respiratory season._ ## Resources diff --git a/pyrenew/convolve.py b/pyrenew/convolve.py index bd427615..03fa6322 100755 --- a/pyrenew/convolve.py +++ b/pyrenew/convolve.py @@ -169,9 +169,9 @@ def _new_scanner( def compute_delay_ascertained_incidence( - p_observed_given_incident: ArrayLike, latent_incidence: ArrayLike, delay_incidence_to_observation_pmf: ArrayLike, + p_observed_given_incident: ArrayLike = 1, ) -> ArrayLike: """ Computes incidences observed according diff --git a/pyrenew/latent/hospitaladmissions.py b/pyrenew/latent/hospitaladmissions.py index 57090528..1fcfc581 100644 --- a/pyrenew/latent/hospitaladmissions.py +++ b/pyrenew/latent/hospitaladmissions.py @@ -211,9 +211,9 @@ def sample( ) = self.infection_to_admission_interval_rv(**kwargs) latent_hospital_admissions = compute_delay_ascertained_incidence( - infection_hosp_rate.value, latent_infections.value, infection_to_admission_interval.value, + infection_hosp_rate.value, ) # Applying the day of the week effect. For this we need to: diff --git a/test/test_incidence_observed_with_delay.py b/test/test_incidence_observed_with_delay.py index 9bff64ad..f510e51a 100644 --- a/test/test_incidence_observed_with_delay.py +++ b/test/test_incidence_observed_with_delay.py @@ -42,8 +42,19 @@ def test(obs_rate, latent_incidence, delay_interval, expected_output): incidence observed with a delay """ result = compute_delay_ascertained_incidence( - obs_rate, latent_incidence, delay_interval, + obs_rate, ) assert_array_equal(result, expected_output) + + +def test_default_obs_rate(): + """ + Compute incidence observed with a delay and default observation rate + """ + result = compute_delay_ascertained_incidence( + jnp.array([1.0, 2.0, 3.0]), + jnp.array([1.0]), + ) + assert_array_equal(result, jnp.array([1.0, 2.0, 3.0]))