packages feed

som 7.4.0 → 7.4.1

raw patch · 2 files changed

+10/−10 lines, 2 files

Files

som.cabal view
@@ -1,5 +1,5 @@ Name:              som-Version:           7.4.0+Version:           7.4.1 Stability:         experimental Synopsis:          Self-Organising Maps. Description:       A Kohonen Self-organising Map (SOM) maps input patterns @@ -33,7 +33,7 @@ source-repository this   type:     git   location: https://github.com/mhwombat/som.git-  tag:      7.4.0+  tag:      7.4.1   library
src/Data/Datamining/Clustering/SSOMInternal.hs view
@@ -38,24 +38,24 @@   rate :: f -> LearningRate f -> LearningRate f  -- | A typical learning function for classifiers.---   @'Exponential' r0 rf tf@ returns a gaussian function. At time zero,---   the learning rate is @r0@. Over time the learning rate tapers off,---   until at time @tf@, the learning rate is @rf@. Normally the---   parameters should be chosen such that:+--   @'Exponential' r0 d@ returns a function to calculate the+--   learning rate. At time zero, the learning rate is @r0@. Over time+--   the learning rate decays exponentially. Normally the parameters+--   should be chosen such that: -----   * 0 < rf << r0 < 1+--   * 0 < r0 < 1 -----   * 0 < tf+--   * 0 < d -- --   where << means "is much smaller than" (not the Haskell @<<@ --   operator!)-data Exponential a = Exponential a a a+data Exponential a = Exponential a a   deriving (Eq, Show, Generic)  instance (Floating a, Fractional a, Num a)     => LearningFunction (Exponential a) where   type LearningRate (Exponential a) = a-  rate (Exponential r0 rf tf) t = r0 * ((rf/r0)**(t/tf))+  rate (Exponential r0 d) t = r0 * exp (-d*t)  -- | A Simplified Self-Organising Map (SSOM). data SSOM f t k p = SSOM