statistics 0.16.0.1 → 0.16.0.2
raw patch · 9 files changed
+22/−16 lines, 9 files
Files
- Statistics/Correlation.hs +3/−3
- Statistics/Distribution/Binomial.hs +1/−1
- Statistics/Distribution/Exponential.hs +1/−1
- Statistics/Distribution/Poisson/Internal.hs +1/−1
- Statistics/Distribution/Weibull.hs +6/−6
- Statistics/Sample.hs +1/−1
- changelog.md +6/−0
- statistics.cabal +1/−1
- tests/Tests/Helpers.hs +2/−2
Statistics/Correlation.hs view
@@ -30,7 +30,7 @@ pearson = correlation {-# INLINE pearson #-} --- | Compute pairwise pearson correlation between rows of a matrix+-- | Compute pairwise Pearson correlation between rows of a matrix pearsonMatByRow :: Matrix -> Matrix pearsonMatByRow m = generateSym (rows m)@@ -43,7 +43,7 @@ -- Spearman ---------------------------------------------------------------- --- | compute spearman correlation between two samples+-- | compute Spearman correlation between two samples spearman :: ( Ord a , Ord b , G.Vector v a@@ -64,7 +64,7 @@ (x, y) = G.unzip xy {-# INLINE spearman #-} --- | compute pairwise spearman correlation between rows of a matrix+-- | compute pairwise Spearman correlation between rows of a matrix spearmanMatByRow :: Matrix -> Matrix spearmanMatByRow = pearsonMatByRow . fromRows . fmap rankUnsorted . toRows
Statistics/Distribution/Binomial.hs view
@@ -165,7 +165,7 @@ -> Maybe BinomialDistribution binomialE n p | n < 0 = Nothing- | p >= 0 || p <= 1 = Just (BD n p)+ | p >= 0 && p <= 1 = Just (BD n p) | otherwise = Nothing errMsg :: Int -> Double -> String
Statistics/Distribution/Exponential.hs view
@@ -11,7 +11,7 @@ -- Portability : portable -- -- The exponential distribution. This is the continuous probability--- distribution of the times between events in a poisson process, in+-- distribution of the times between events in a Poisson process, in -- which events occur continuously and independently at a constant -- average rate.
Statistics/Distribution/Poisson/Internal.hs view
@@ -164,7 +164,7 @@ dropWhile (not . (< negate m_epsilon * lambda)) $ [ let x = probability lambda k in x * log x | k <- [0..]] --- | Compute the entropy of a poisson distribution using the best available+-- | Compute the entropy of a Poisson distribution using the best available -- method. poissonEntropy :: Double -> Double poissonEntropy lambda
Statistics/Distribution/Weibull.hs view
@@ -10,7 +10,7 @@ -- Stability : experimental -- Portability : portable ----- The weibull distribution. This is a continuous probability+-- The Weibull distribution. This is a continuous probability -- distribution that describes the occurrence of a single event whose -- probability changes over time, controlled by the shape parameter. @@ -38,7 +38,7 @@ import Statistics.Internal --- | The weibull distribution.+-- | The Weibull distribution. data WeibullDistribution = WD { wdShape :: {-# UNPACK #-} !Double , wdLambda :: {-# UNPACK #-} !Double@@ -99,11 +99,11 @@ instance D.ContGen WeibullDistribution where genContVar d = D.genContinuous d --- | Standard weibull distribution with scale factor (lambda) 1.+-- | Standard Weibull distribution with scale factor (lambda) 1. weibullStandard :: Double -> WeibullDistribution weibullStandard k = weibullDistr k 1.0 --- | Create weibull distribution from parameters.+-- | Create Weibull distribution from parameters. -- -- If the shape (first) parameter is @1.0@, the distribution is equivalent to a -- 'Statistics.Distribution.Exponential.ExponentialDistribution' with parameter@@ -114,7 +114,7 @@ -> WeibullDistribution weibullDistr k l = either error id $ weibullDistrErr k l --- | Create weibull distribution from parameters.+-- | Create Weibull distribution from parameters. -- -- If the shape (first) parameter is @1.0@, the distribution is equivalent to a -- 'Statistics.Distribution.Exponential.ExponentialDistribution' with parameter@@ -134,7 +134,7 @@ ++ " and lambda " ++ show l --- | Create weibull distribution from mean and standard deviation.+-- | Create Weibull distribution from mean and standard deviation. -- -- The algorithm is from "Methods for Estimating Wind Speed Frequency -- Distributions", C. G. Justus, W. R. Hargreaves, A. Mikhail, D. Graber, 1977.
Statistics/Sample.hs view
@@ -215,7 +215,7 @@ -- $variance ----- The variance—and hence the standard deviation—of a+-- The variance — and hence the standard deviation — of a -- sample of fewer than two elements are both defined to be zero. -- $robust
changelog.md view
@@ -1,3 +1,9 @@+## Changes in 0.16.0.2++ * Bug in constructor of binomial distribution is fixed (#181). It accepted+ out-of range probability before.++ ## Changes in 0.16.0.0 * Random number generation switched to API introduced in random-1.2
statistics.cabal view
@@ -1,5 +1,5 @@ name: statistics-version: 0.16.0.1+version: 0.16.0.2 synopsis: A library of statistical types, data, and functions description: This library provides a number of common functions and types useful
tests/Tests/Helpers.hs view
@@ -60,8 +60,8 @@ -- Check that function is nondecreasing taking rounding errors into -- account. ----- In fact funstion is allowed to decrease less than one ulp in order--- to guard againist problems with excess precision. On x86 FPU works+-- In fact function is allowed to decrease less than one ulp in order+-- to guard against problems with excess precision. On x86 FPU works -- with 80-bit numbers but doubles are 64-bit so rounding happens -- whenever values are moved from registers to memory monotonicallyIncreasesIEEE :: (Ord a, IEEE.IEEE b) => (a -> b) -> a -> a -> Bool