Safe Haskell | None |
---|---|
Language | Haskell2010 |
Provides newtypes for odds, log-odds, and discretized versions.
TODO This is currently quite ad-hoc and needs better formalization. In
particular in terms of wrapping and usage of Num
and Semiring
.
Synopsis
- newtype Odds = Odds {}
- newtype DiscLogOdds (t :: k) = DiscLogOdds {}
Documentation
Odds.
newtype DiscLogOdds (t :: k) Source #
Encodes log-odds that have been rounded or clamped to integral numbers.
One advantage this provides is more efficient "maximum/minimum" calculations
compared to using Double
s.
Note that these are "explicit" log-odds. Each numeric operation uses the
underlying operation on Int
. If you want automatic handling, choose Log
Odds
.