packages feed

som 10.1.3 → 10.1.4

raw patch · 3 files changed

+9/−7 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.Datamining.Clustering.SGM3: train :: (Num t, Ord t, Fractional x, Num x, Ord x, Enum k, Ord k) => SGM t x k p -> p -> SGM t x k p
+ Data.Datamining.Clustering.SGM3: train :: (Num t, Ord t, Fractional x, Real x, Num x, Ord x, Enum k, Ord k) => SGM t x k p -> p -> SGM t x k p
- Data.Datamining.Clustering.SGM3: trainAndClassify :: (Num t, Ord t, Fractional x, Num x, Ord x, Enum k, Ord k) => SGM t x k p -> p -> (k, x, Map k (p, x), SGM t x k p)
+ Data.Datamining.Clustering.SGM3: trainAndClassify :: (Num t, Ord t, Fractional x, Real x, Num x, Ord x, Enum k, Ord k) => SGM t x k p -> p -> (k, x, Map k (p, x), SGM t x k p)
- Data.Datamining.Clustering.SGM3: trainBatch :: (Num t, Ord t, Fractional x, Num x, Ord x, Enum k, Ord k) => SGM t x k p -> [p] -> SGM t x k p
+ Data.Datamining.Clustering.SGM3: trainBatch :: (Num t, Ord t, Fractional x, Real x, Num x, Ord x, Enum k, Ord k) => SGM t x k p -> [p] -> SGM t x k p
- Data.Datamining.Clustering.SGM3Internal: meanModelDiff :: (Fractional x, Num x, Ord x, Eq k, Ord k) => SGM t x k p -> x
+ Data.Datamining.Clustering.SGM3Internal: meanModelDiff :: (Fractional x, Real x, Num x, Ord x, Eq k, Ord k) => SGM t x k p -> x
- Data.Datamining.Clustering.SGM3Internal: train :: (Num t, Ord t, Fractional x, Num x, Ord x, Enum k, Ord k) => SGM t x k p -> p -> SGM t x k p
+ Data.Datamining.Clustering.SGM3Internal: train :: (Num t, Ord t, Fractional x, Real x, Num x, Ord x, Enum k, Ord k) => SGM t x k p -> p -> SGM t x k p
- Data.Datamining.Clustering.SGM3Internal: trainAndClassify :: (Num t, Ord t, Fractional x, Num x, Ord x, Enum k, Ord k) => SGM t x k p -> p -> (k, x, Map k (p, x), SGM t x k p)
+ Data.Datamining.Clustering.SGM3Internal: trainAndClassify :: (Num t, Ord t, Fractional x, Real x, Num x, Ord x, Enum k, Ord k) => SGM t x k p -> p -> (k, x, Map k (p, x), SGM t x k p)
- Data.Datamining.Clustering.SGM3Internal: trainBatch :: (Num t, Ord t, Fractional x, Num x, Ord x, Enum k, Ord k) => SGM t x k p -> [p] -> SGM t x k p
+ Data.Datamining.Clustering.SGM3Internal: trainBatch :: (Num t, Ord t, Fractional x, Real x, Num x, Ord x, Enum k, Ord k) => SGM t x k p -> [p] -> SGM t x k p

Files

ChangeLog.md view
@@ -1,5 +1,6 @@ # Changelog for som +10.1.4 Modified SGM3 to work with limited range floating point types. 10.1.3 Added SGM3. 10.1.2 Fixed a warning.        Added SGM2.
som.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: adbfa8982ae14db2b504e528d5122057466a1628c04b8f3d74dbbb3d25dc2fdd+-- hash: 1bf49fbb93fa296979cf7d70de8ae9502be4b03a10627c6d7d158c97eafae269  name:           som-version:        10.1.3+version:        10.1.4 synopsis:       Self-Organising Maps description:    Please see the README on GitHub at <https://github.com/mhwombat/som#readme> category:       Math
src/Data/Datamining/Clustering/SGM3Internal.hs view
@@ -205,11 +205,12 @@ -- | Returns the labels of the two most similar models, and the --   difference between them. meanModelDiff-  :: (Fractional x, Num x, Ord x, Eq k, Ord k)+  :: (Fractional x, Real x, Num x, Ord x, Eq k, Ord k)   => SGM t x k p -> x meanModelDiff s   | size s == 0 = 0-  | otherwise  = mean . map snd $ modelDiffs s+  | otherwise  = fromRational . mean . map (toRational . snd)+                   $ modelDiffs s  -- | Calculate the mean of a set of values. -- mean :: (Eq a, Fractional a, Foldable t) => t a -> a@@ -290,7 +291,7 @@ --   SGM, --   and the updated SGM. trainAndClassify-  :: (Num t, Ord t, Fractional x, Num x, Ord x, Enum k, Ord k)+  :: (Num t, Ord t, Fractional x, Real x, Num x, Ord x, Enum k, Ord k)     => SGM t x k p -> p -> (k, x, M.Map k (p, x), SGM t x k p) trainAndClassify s p   | size s < 2               = addModelTrainAndClassify s p@@ -327,7 +328,7 @@ --   matches @p@, and updates it to be a somewhat better match. --   If necessary, it will create a new node and model. train-  :: (Num t, Ord t, Fractional x, Num x, Ord x, Enum k, Ord k)+  :: (Num t, Ord t, Fractional x, Real x, Num x, Ord x, Enum k, Ord k)     => SGM t x k p -> p -> SGM t x k p train s p = s'   where (_, _, _, s') = trainAndClassify s p@@ -336,7 +337,7 @@ --   model in @s@ that most closely matches @p@, --   and updates it to be a somewhat better match. trainBatch-  :: (Num t, Ord t, Fractional x, Num x, Ord x, Enum k, Ord k)+  :: (Num t, Ord t, Fractional x, Real x, Num x, Ord x, Enum k, Ord k)     => SGM t x k p -> [p] -> SGM t x k p trainBatch = foldl' train