diff --git a/model/README.md b/model/README.md index caa7bd8e..8c873ad6 100755 --- a/model/README.md +++ b/model/README.md @@ -1,6 +1,6 @@ -# PyRenew: A package for Bayesian renewal modeling with JAX and Numpyro. +# PyRenew: A Package for Bayesian Renewal Modeling with JAX and Numpyro. -`pyrenew` is a flexible tool for simulation and inference of epidemiological models with an emphasis on renewal models. Built on top of `numpyro`, `pyrenew` provides core components for model building as well as pre-defined models for processing various types of observational processes. +`pyrenew` is a flexible tool for simulating and statistical inference of epidemiological models, emphasizing renewal models. Built on top of the [`numpyro`](https://num.pyro.ai/) Python library, `pyrenew` provides core components for model building, including pre-defined models for processing various types of observational processes. ## Installation @@ -12,4 +12,4 @@ pip install git+https://github.com/cdcent/cfa-pyrenew.git ## Demo -The [`docs`](docs) folder contains quarto documents to get you started. It simulates observed hospitalizations using a simple renewal process model and then fits to it using a No-U-Turn Sampler. +The [`docs`](docs) folder contains quarto documents to get you started. It simulates observed hospitalizations using a simple renewal process model and then fits it using a No-U-Turn Sampler. diff --git a/model/docs/getting-started.md b/model/docs/getting-started.md index 894408a4..884dbac6 100644 --- a/model/docs/getting-started.md +++ b/model/docs/getting-started.md @@ -17,7 +17,7 @@ quantities**. Mainly, sampling from a `RandomVariable` involves calling the `sample()` method. The benefit of this design is the definition of the sample function can be arbitrary, allowing the user to either sample from a distribution using `numpyro.sample()`, compute fixed quantities -(like a mechanistic equation,) or return a fixed value (like a +(like a mechanistic equation), or return a fixed value (like a pre-computed PMF.) For instance, we may be interested in estimating a PMF, in which case a `RandomVariable` sampling function may roughly be defined as: @@ -29,7 +29,7 @@ class MyRandVar(RandomVariable): ``` Whereas, in some other cases, we may instead use a fixed quantity for -that variable (like a pre-computed PMF,) where the `RandomVariable`’s +that variable (like a pre-computed PMF), where the `RandomVariable`’s sample function could be defined like: ``` python @@ -45,7 +45,7 @@ some quantity needed for other calculations (second case.) The `Model` metaclass provides basic functionality for estimating and simulation. Like `RandomVariable`, the `Model` metaclass has a `sample()` method that defines the model structure. Ultimately, models -can be nested (or inherited,) providing a straightforward way to add +can be nested (or inherited), providing a straightforward way to add layers of complexity. ## ‘Hello world’ model diff --git a/model/docs/getting-started.qmd b/model/docs/getting-started.qmd index 46dde101..f17bbbca 100644 --- a/model/docs/getting-started.qmd +++ b/model/docs/getting-started.qmd @@ -8,7 +8,7 @@ engine: jupyter ## The fundamentals -`pyrenew`'s core components are the metaclasses `RandomVariable` and `Model`. From the package's perspective, a `RandomVariable` is a quantity models can sample and estimate, **including deterministic quantities**. Mainly, sampling from a `RandomVariable` involves calling the `sample()` method. The benefit of this design is the definition of the sample function can be arbitrary, allowing the user to either sample from a distribution using `numpyro.sample()`, compute fixed quantities (like a mechanistic equation,) or return a fixed value (like a pre-computed PMF.) For instance, we may be interested in estimating a PMF, in which case a `RandomVariable` sampling function may roughly be defined as: +`pyrenew`'s core components are the metaclasses `RandomVariable` and `Model`. From the package's perspective, a `RandomVariable` is a quantity models can sample and estimate, **including deterministic quantities**. Mainly, sampling from a `RandomVariable` involves calling the `sample()` method. The benefit of this design is the definition of the sample function can be arbitrary, allowing the user to either sample from a distribution using `numpyro.sample()`, compute fixed quantities (like a mechanistic equation), or return a fixed value (like a pre-computed PMF.) For instance, we may be interested in estimating a PMF, in which case a `RandomVariable` sampling function may roughly be defined as: ```python class MyRandVar(RandomVariable): @@ -16,7 +16,7 @@ class MyRandVar(RandomVariable): return numpyro.sample(...) ``` -Whereas, in some other cases, we may instead use a fixed quantity for that variable (like a pre-computed PMF,) where the `RandomVariable`'s sample function could be defined like: +Whereas, in some other cases, we may instead use a fixed quantity for that variable (like a pre-computed PMF), where the `RandomVariable`'s sample function could be defined like: ```python class MyRandVar(RandomVariable): @@ -26,7 +26,7 @@ class MyRandVar(RandomVariable): This way, when a `Model` samples from `MyRandVar`, it could be either adding random variables to be estimated (first case) or just retrieving some quantity needed for other calculations (second case.) -The `Model` metaclass provides basic functionality for estimating and simulation. Like `RandomVariable`, the `Model` metaclass has a `sample()` method that defines the model structure. Ultimately, models can be nested (or inherited,) providing a straightforward way to add layers of complexity. +The `Model` metaclass provides basic functionality for estimating and simulation. Like `RandomVariable`, the `Model` metaclass has a `sample()` method that defines the model structure. Ultimately, models can be nested (or inherited), providing a straightforward way to add layers of complexity. ## 'Hello world' model