We should be able to conveniently create new RandomVariables based on numpyro.distributions.
Context
Right now, there are several places where we have repeated code to create RandomVariables based on numpyro.distributions.
For example, the Infections0 class and the InfectHospRate class are nearly identical and contain duplicative code.
Instead, we should be able to create any RandomVariable based on a numpyro.distributions via something like DistributionalRV(name: str, dist: dist.Distribution).
Goal
We should be able to conveniently create new
RandomVariable
s based onnumpyro.distributions
.Context
Right now, there are several places where we have repeated code to create
RandomVariable
s based onnumpyro.distributions
.For example, the
Infections0
class and theInfectHospRate
class are nearly identical and contain duplicative code.Instead, we should be able to create any
RandomVariable
based on anumpyro.distributions
via something likeDistributionalRV(name: str, dist: dist.Distribution)
.