Skip to content

Commit

Permalink
Commas and title
Browse files Browse the repository at this point in the history
  • Loading branch information
gvegayon committed Apr 3, 2024
1 parent 39c54c4 commit 25fa66a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions model/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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.
6 changes: 3 additions & 3 deletions model/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions model/docs/getting-started.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ 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):
def sample(...) -> ArrayLike:
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):
Expand All @@ -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
Expand Down

0 comments on commit 25fa66a

Please sign in to comment.