packages feed

dirichlet 0.1.0.0 → 0.1.0.2

raw patch · 5 files changed

+73/−46 lines, 5 filesdep −hspec-discoverdep ~basedep ~hspecdep ~log-domain

Dependencies removed: hspec-discover

Dependency ranges changed: base, hspec, log-domain, math-functions, mwc-random, primitive, vector

Files

− CHANGELOG.md
@@ -1,5 +0,0 @@-# Revision history for dirichlet--## 0.1.0.0 -- YYYY-mm-dd--* First version. Released on an unsuspecting world.
+ ChangeLog.md view
@@ -0,0 +1,22 @@++# Revision history for dirichlet+++## Unreleased changes+++## 0.1.0.2++-   Bugfix cabal file.+++## 0.1.0.1++-   Cabal changes.+-   Version policy changes.+++## 0.1.0.0++-   First version. Released on an unsuspecting world.+
+ README.md view
@@ -0,0 +1,6 @@++# Multivariate Dirichlet distribution++The [statistics](https://hackage.haskell.org/package/statistics) package does not support multivariate distributions. This package+provides basic functions to work with the multivariate Dirichlet distribution.+
dirichlet.cabal view
@@ -1,43 +1,47 @@-cabal-version:       2.4+cabal-version:      2.4+name:               dirichlet+version:            0.1.0.2+license:            BSD-3-Clause+license-file:       LICENSE+copyright:          Dominik Schrempf 2020+maintainer:         dominik.schrempf@gmail.com+author:             Dominik Schrempf+homepage:           https://github.com/dschrempf/dirichlet+bug-reports:        https://github.com/dschrempf/dirichlet+synopsis:           Multivariate Dirichlet distribution+description:+    Please see the README on GitHub at <https://github.com/dschrempf/dirichlet#readme> -name:                dirichlet-version:             0.1.0.0-synopsis:            Multivariate dirichlet distribution-description:         Please see the README on GitHub at <https://github.com/dschrempf/dirichlet#readme>-homepage:            https://github.com/dschrempf/dirichlet-bug-reports:-license:             BSD-3-Clause-license-file:        LICENSE-author:              Dominik Schrempf-maintainer:          dominik.schrempf@gmail.com--- copyright:-category:            Math-build-type:          Simple-extra-source-files:  CHANGELOG.md+category:           Math+build-type:         Simple+extra-source-files:+    README.md+    ChangeLog.md  library-  exposed-modules:     Statistics.Distribution.Dirichlet-  -- other-modules:-  -- other-extensions:-  build-depends:       base >=4.14 && <4.15-                     , log-domain-                     , math-functions-                     , mwc-random-                     , primitive-                     , vector-  hs-source-dirs:      src-  default-language:    Haskell2010+    exposed-modules:  Statistics.Distribution.Dirichlet+    hs-source-dirs:   src+    default-language: Haskell2010+    ghc-options:      -Wall -Wunused-packages+    build-depends:+        base >=4.14.1.0 && <4.15,+        log-domain ==0.13.*,+        math-functions >=0.3.4.1 && <0.4,+        mwc-random >=0.14.0.0 && <0.15,+        primitive >=0.7.1.0 && <0.8,+        vector >=0.12.1.2 && <0.13  test-suite dirichlet-test-  default-language:    Haskell2010-  type:                exitcode-stdio-1.0-  hs-source-dirs:      test-  main-is:             Spec.hs-  other-modules:       Statistics.Distribution.DirichletSpec-  build-depends:       base >=4.14 && <4.15-                     , dirichlet-                     , hspec-                     , hspec-discover-                     , log-domain-                     , mwc-random-                     , vector+    type:             exitcode-stdio-1.0+    main-is:          Spec.hs+    hs-source-dirs:   test+    other-modules:    Statistics.Distribution.DirichletSpec+    default-language: Haskell2010+    ghc-options:      -Wall -Wunused-packages+    build-depends:+        base >=4.14.1.0 && <4.15,+        dirichlet -any,+        hspec >=2.7.4 && <2.8,+        log-domain ==0.13.*,+        mwc-random >=0.14.0.0 && <0.15,+        vector >=0.12.1.2 && <0.13
test/Statistics/Distribution/DirichletSpec.hs view
@@ -73,8 +73,8 @@       map V.length xs `shouldBe` replicate 1000 10       -- print [ xbar i xs | i <- [0..9]]       [ abs (xbar i xs - 0.1) > 0.01 | i <- [0..9]] `shouldBe` replicate 10 False-      xs <- replicateM 1000 (dirichletSample dd10 g)-      map V.length xs `shouldBe` replicate 1000 10+      xs' <- replicateM 1000 (dirichletSample dd10 g)+      map V.length xs' `shouldBe` replicate 1000 10       -- print [ xbar i xs | i <- [0..9]]       let aSum = V.sum alphas10-      [ abs (xbar i xs - (alphas10 V.! i / aSum)) > 0.01 | i <- [0..9]] `shouldBe` replicate 10 False+      [ abs (xbar i xs' - (alphas10 V.! i / aSum)) > 0.01 | i <- [0..9]] `shouldBe` replicate 10 False