Copyright | (c) Dominik Schrempf 2021 |
---|---|
License | GPL-3.0-or-later |
Maintainer | dominik.schrempf@gmail.com |
Stability | unstable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Creation date: Thu Jul 23 13:26:14 2020.
Synopsis
- type Prior = Log Double
- type PriorFunction a = a -> Prior
- noPrior :: PriorFunction a
- largerThan :: LowerBoundary -> PriorFunction Double
- positive :: PriorFunction Double
- lowerThan :: UpperBoundary -> PriorFunction Double
- negative :: PriorFunction Double
- exponential :: Rate -> PriorFunction Double
- gamma :: Shape -> Scale -> PriorFunction Double
- gammaMeanVariance :: Mean -> Variance -> PriorFunction Double
- gammaMeanOne :: Shape -> PriorFunction Double
- gammaShapeScaleToMeanVariance :: Shape -> Scale -> (Mean, Variance)
- gammaMeanVarianceToShapeScale :: Mean -> Variance -> (Shape, Scale)
- normal :: Mean -> StandardDeviation -> PriorFunction Double
- uniform :: LowerBoundary -> UpperBoundary -> PriorFunction Double
- poisson :: Rate -> PriorFunction Int
- product' :: [Log Double] -> Log Double
Documentation
type PriorFunction a = a -> Prior Source #
Prior function.
noPrior :: PriorFunction a Source #
Flat prior function. Useful for testing and debugging.
Improper priors
largerThan :: LowerBoundary -> PriorFunction Double Source #
Improper uniform prior; strictly larger than a given value.
positive :: PriorFunction Double Source #
Improper uniform prior; strictly larger than zero.
lowerThan :: UpperBoundary -> PriorFunction Double Source #
Improper uniform prior; strictly lower than a given value.
negative :: PriorFunction Double Source #
Improper uniform prior; strictly lower than zero.
Continuous priors
exponential :: Rate -> PriorFunction Double Source #
Exponential distributed prior.
gammaMeanVariance :: Mean -> Variance -> PriorFunction Double Source #
See gamma
but parametrized using mean and variance.
gammaMeanOne :: Shape -> PriorFunction Double Source #
Gamma disstributed prior with given shape and mean 1.0.
gammaShapeScaleToMeanVariance :: Shape -> Scale -> (Mean, Variance) Source #
Calculate mean and variance of the gamma distribution given the shape and the scale.
gammaMeanVarianceToShapeScale :: Mean -> Variance -> (Shape, Scale) Source #
Calculate shape and scale of the gamma distribution given the mean and the variance.
normal :: Mean -> StandardDeviation -> PriorFunction Double Source #
Normal distributed prior.
uniform :: LowerBoundary -> UpperBoundary -> PriorFunction Double Source #
Uniform prior on [a, b].