bayesplain.priors.RatePrior¶
-
class bayesplain.priors.RatePrior(shape, exposure=
0.0, name='custom', rationale='')[source]¶ A Gamma prior on a rate of events per unit of exposure.
Read the two numbers as data you pretend to have seen already:
shapeevents overexposureunits of watching. The presets setexposureto zero, which carries no information about how large the rate is – no units, so nothing to get wrong – and leaves only the smallshapeterm, which matters when events are rare.- Variables:¶
- shape : float¶
Worth this many events.
- exposure : float¶
Worth this much exposure, in the same units as the data. Zero gives an improper prior, which is fine for estimation but cannot be drawn.
- name : str¶
Short label used in printed output.
- rationale : str¶
Plain-English statement of what this assumption commits you to.
Methods
dist()Return the prior as a frozen scipy distribution, or
None.