Source

statistics / Statistics / Distribution / Geometric.hs

Author Commit Message Labels Comments Date
Aleksey Khudyakov
Add logProbability to geometric distribution
Daniel Fox Franke
Entropy instance for GeometricDistribution Also changed "finite entropy" to "well-defined entropy" in the description of the contract for the Entropy typeclass. GeometricDistribution defines Mean and Variance even though it treats a success probability of 0 as legal, so we should be consistent by defining Entropy (and not just MaybeEntropy) as well.
Bryan O'Sullivan
Add Binary instances
Bryan O'Sullivan
Add GHC generics support everywhere
Aleksey Khudyakov
Fix cumulative for distributions Properly handle infinities and NaNs
Aleksey Khudyakov
Fix NaN handling
Aleksey Khudyakov
Rework type class structure for distributions statistics Some distributions do not have variance or mean for some values of parameters. Student-T is an example. Simplest solution is to return NaN but it's way too implict One option is change Mean (and Variance) type class: > class Mean d where > mean :: d → Maybe Double But it would be really annoying to unwrap Just constructor for distribution which have mean defined for all parameters. It also en…
Bryan O'Sullivan
Drop an unneeded import
Aleksey Khudyakov
Throw errors in smart constructors of the distribution if parameters are invalid
Aleksey Khudyakov
Change API of concrete ditributions Constructors for some of ditributions have names fromLambda,fromParams. Such names are meaningful inside module but when they are imported they became a much less undertandable. Also such names appear more than once which may lead to name clashes. Construtors are renamed to mention distribution name. * Accessor added to Poisson ditribution * Unneeded imports removed P.S. Gamma and hypergeometri…
Aleksey Khudyakov
Fix geometric distribution
Aleksey Khudyakov
Change type class structure for distributions type class for distribution is split into 3, for discrete distributions, for continuous and general. All distributions. Are rewritten to accomodate new structure. There are may be problems with loss of precision at border cases. This should be checked
Bryan O'Sullivan
Rename inverse to quantile, again per Pat Perry.'
Bryan O'Sullivan
Rename probability to density, fix docs. Suggested by Patrick Perry.
Bryan O'Sullivan
Fix doco.
Bryan O'Sullivan
Add geometric distribution.