hstatistics 0.2.2.9 → 0.2.2.10
raw patch · 4 files changed
+8/−14 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGES +3/−0
- INSTALL +2/−11
- hstatistics.cabal +1/−1
- lib/Numeric/Statistics/Information.hs +2/−2
CHANGES view
@@ -75,3 +75,6 @@ 0.2.2.9: divide mutual information/entropy by sample size++0.2.2.10:+ remove previous change
INSTALL view
@@ -1,17 +1,8 @@ ------------------------------------------------ A statistics library for Haskell+ A Graph Layout library for Haskell ----------------------------------------------- INSTALLATION -cabal install hstatistics--OR--tar xzf hstatistics-x.y.z.tar.gz-cd hstatistics-runhaskell Setup.lhs configure-runhaskell Setup.lhs build-runhaskell Setup.lhs hadock-runhaskell Setup.lhs install+cabal install graph-layout
hstatistics.cabal view
@@ -1,5 +1,5 @@ Name: hstatistics-Version: 0.2.2.9+Version: 0.2.2.10 License: BSD3 License-file: LICENSE Copyright: (c) A.V.H. McPhail 2010, 2011
lib/Numeric/Statistics/Information.hs view
@@ -42,7 +42,7 @@ -> Vector Double -- ^ the sequence -> Double -- ^ the entropy entropy p x = let ps = probability p x- in negate $ (dot ps (logE ps)) / (fromIntegral $ dim x)+ in negate $ (dot ps (logE ps)) -- | the mutual information \sum_x \sum_y p(x,y) \ln{\frac{p(x,y)}{p(x)p(y)}} mutual_information :: (PDF a Double, PDF b (Double,Double)) @@ -54,6 +54,6 @@ mutual_information p px py (x,y) = let ps = probability p $ zipVector x y xs = probability px x ys = probability py y- in (dot ps (logE ps - logE (xs*ys))) / (fromIntegral $ dim x) + in (dot ps (logE ps - logE (xs*ys))) -----------------------------------------------------------------------------