hstatistics 0.2.2.6 → 0.2.2.7
raw patch · 8 files changed
+18/−21 lines, 8 filesdep ~hmatrix-gsl-statsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: hmatrix-gsl-stats
API changes (from Hackage documentation)
Files
- hstatistics.cabal +5/−5
- lib/Numeric/Statistics.hs +1/−1
- lib/Numeric/Statistics/Histogram.hs +0/−1
- lib/Numeric/Statistics/ICA.hs +2/−3
- lib/Numeric/Statistics/Information.hs +1/−1
- lib/Numeric/Statistics/PCA.hs +0/−1
- lib/Numeric/Statistics/PDF.hs +2/−1
- lib/Numeric/Statistics/Surrogate.hs +7/−8
hstatistics.cabal view
@@ -1,8 +1,8 @@ Name: hstatistics-Version: 0.2.2.6+Version: 0.2.2.7 License: BSD3 License-file: LICENSE-Copyright: (c) A.V.H. McPhail 2010+Copyright: (c) A.V.H. McPhail 2010, 2011 Author: Vivian McPhail Maintainer: haskell.vivian.mcphail <at> gmail <dot> com Stability: provisional@@ -17,9 +17,9 @@ . Feature requests, suggestions, and bug fixes welcome. Category: Math, Statistics-tested-with: GHC ==6.12.1+tested-with: GHC ==7.0.1 -cabal-version: >=1.6+cabal-version: >=1.8 build-type: Simple @@ -31,7 +31,7 @@ Build-Depends: base >= 4 && < 5, array, random, hmatrix >= 0.10.0.0,- hmatrix-gsl-stats >= 0.1.2.6+ hmatrix-gsl-stats >= 0.1.2.9 Extensions:
lib/Numeric/Statistics.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS_GHC -fglasgow-exts #-}+{-# LANGUAGE FlexibleContexts #-} ----------------------------------------------------------------------------- -- | -- Module : Numeric.Statistics
lib/Numeric/Statistics/Histogram.hs view
@@ -1,4 +1,3 @@-{-# OPTIONS_GHC -fglasgow-exts #-} ----------------------------------------------------------------------------- -- | -- Module : Numeric.Statistics.Histogram
lib/Numeric/Statistics/ICA.hs view
@@ -1,4 +1,3 @@-{-# OPTIONS_GHC -fglasgow-exts #-} ----------------------------------------------------------------------------- -- | -- Module : Numeric.Statistics.ICA@@ -116,8 +115,8 @@ ----------------------------------------------------------------------------- -unconcat 0 _ _ = []-unconcat (r+1) c xs = [take c xs] ++ unconcat r c (drop c xs)+unconcat 0 _ _ = []+unconcat r c xs = [take c xs] ++ unconcat (r-1) c (drop c xs) random_vector :: Int -> (Int,Int) -> Matrix Double random_vector s (r,c) = fromLists $ unconcat r c $ randomRs (-1,1) (mkStdGen s)
lib/Numeric/Statistics/Information.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS_GHC -fglasgow-exts #-}+{-# LANGUAGE FlexibleContexts #-} ----------------------------------------------------------------------------- -- | -- Module : Numeric.Statistics.Information
lib/Numeric/Statistics/PCA.hs view
@@ -1,4 +1,3 @@-{-# OPTIONS_GHC -fglasgow-exts #-} ----------------------------------------------------------------------------- -- | -- Module : Numeric.Statistics.PCA
lib/Numeric/Statistics/PDF.hs view
@@ -1,4 +1,5 @@-{-# OPTIONS_GHC -fglasgow-exts #-}+{-# LANGUAGE MultiParamTypeClasses,+ FlexibleInstances #-} ----------------------------------------------------------------------------- -- | -- Module : Numeric.Statistics.PDF
lib/Numeric/Statistics/Surrogate.hs view
@@ -1,4 +1,3 @@-{-# OPTIONS_GHC -fglasgow-exts #-} ----------------------------------------------------------------------------- -- | -- Module : Numeric.Statistics.Surrogate@@ -41,15 +40,15 @@ surrogate r n f d = I.listArray (1,n+1) $ (f d) : (surrogate' (mkStdGen r) n f d) surrogate' :: StdGen -> Int-> (I.Array Int (Vector Double) -> a) -> I.Array Int (Vector Double) -> [a]-surrogate' _ 0 _ _ = []-surrogate' g (n+1) f d = let (g',g'') = split g- d' = permute_data g' d- in (f d) : (surrogate' g'' n f d)+surrogate' _ 0 _ _ = []+surrogate' g n f d = let (g',g'') = split g+ d' = permute_data g' d+ in (f d) : (surrogate' g'' (n-1) f d) randomList :: StdGen -> Int -> [Int]-randomList _ 0 = []-randomList g (n+1) = let (r,g') = random g- in r : (randomList g' n)+randomList _ 0 = []+randomList g n = let (r,g') = random g+ in r : (randomList g' (n-1)) permute_data :: StdGen -> I.Array Int (Vector Double) -> I.Array Int (Vector Double) permute_data g d = let s = I.rangeSize $ I.bounds d