packages feed

rank-product 0.1.0.4 → 0.1.0.5

raw patch · 3 files changed

+6/−6 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Statistics.Types: instance GHC.Show.Show Statistics.Types.RankEntity
- Statistics.RankProduct: rankList :: (Ord a) => [a] -> [Int]
+ Statistics.RankProduct: rankList :: (Ord a) => [a] -> [Double]
- Statistics.Types: RankEntity :: [Int] -> RankEntity
+ Statistics.Types: RankEntity :: [Double] -> RankEntity
- Statistics.Types: [unRankEntity] :: RankEntity -> [Int]
+ Statistics.Types: [unRankEntity] :: RankEntity -> [Double]

Files

rank-product.cabal view
@@ -1,5 +1,5 @@ name:                rank-product-version:             0.1.0.4+version:             0.1.0.5 synopsis:            Find the rank product of a data set. description:         Find the rank product of a data set and get the p-value from a permutation test. homepage:            http://github.com/GregorySchwartz/rank-product#readme
src/Statistics/RankProduct.hs view
@@ -18,6 +18,8 @@ import Data.Function (on) import Data.List import Data.Random+import Debug.Trace+      -- Cabal @@ -25,7 +27,7 @@ import Statistics.Types  -- | Rank transform a list.-rankList :: (Ord a) => [a] -> [Int]+rankList :: (Ord a) => [a] -> [Double] rankList = fmap fst          . sortBy (compare `on` (fst . snd))          . zip [1..]@@ -37,7 +39,6 @@ rankProduct xs =     fmap ( RankProductEntity          . (** (1 / (genericLength . unEntity . head $ xs)))-         . fromIntegral          . product          )         . transpose@@ -53,7 +54,6 @@     fmap         ( RankProductEntity         . (** (1 / (genericLength . unRankEntity . head $ xs)))-        . fromIntegral         . product         . unRankEntity         )
src/Statistics/Types.hs view
@@ -16,10 +16,10 @@ -- Basic newtype Permutations      = Permutations Int newtype Entity            = Entity { unEntity :: [Double] } deriving (Show)-newtype RankEntity        = RankEntity { unRankEntity :: [Int] }+newtype RankEntity        = RankEntity { unRankEntity :: [Double] } deriving (Show) newtype RankProductEntity = RankProductEntity     { unRankProductEntity :: Double-    } deriving ((Show))+    } deriving (Show) newtype PValue            = PValue { unPValue :: Double } deriving (Show)  -- Advanced