som-7.4.0: Self-Organising Maps.

Copyright(c) Amy de Buitléir 2012-2014
LicenseBSD-style
Maintaineramy@nualeargais.ie
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Datamining.Clustering.SSOMInternal

Description

A module containing private SSOM internals. Most developers should use SSOM instead. This module is subject to change without notice.

Synopsis

Documentation

class LearningFunction f where Source

A function used to adjust the models in a classifier.

Associated Types

type LearningRate f Source

Methods

rate :: f -> LearningRate f -> LearningRate f Source

rate f t returns the learning rate for a node. The parameter f is the learning function. The parameter t indicates how many patterns (or pattern batches) have previously been presented to the classifier. Typically this is used to make the learning rate decay over time. The output is the learning rate for that node (the amount by which the node's model should be updated to match the target). The learning rate should be between zero and one.

Instances

data Exponential a Source

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:

  • 0 < rf << r0 < 1
  • 0 < tf

where << means "is much smaller than" (not the Haskell << operator!)

Constructors

Exponential a a a 

Instances

data SSOM f t k p Source

A Simplified Self-Organising Map (SSOM).

Constructors

SSOM 

Fields

sMap :: Map k p

Maps patterns to nodes.

learningFunction :: f

The function used to update the nodes.

counter :: t

A counter used as a "time" parameter. If you create the SSOM with a counter value 0, and don't directly modify it, then the counter will represent the number of patterns that this SSOM has classified.

Instances

(Pattern p, Ord (Metric p), LearningFunction f, (~) * (Metric p) (LearningRate f), Num (LearningRate f), Ord k, Integral t) => Classifier (SSOM f t) k p 
(Eq f, Eq t, Eq k, Eq p) => Eq (SSOM f t k p) 
(Show f, Show t, Show k, Show p) => Show (SSOM f t k p) 
Generic (SSOM f t k p) 
type Rep (SSOM f t k p) 

toMap :: SSOM f t k p -> Map k p Source

Extracts the current models from the SSOM. A synonym for sMap.

trainNode :: (Pattern p, LearningFunction f, Metric p ~ LearningRate f, Num (LearningRate f), Ord k, Integral t) => SSOM f t k p -> k -> p -> SSOM f t k p Source

Trains the specified node to better match a target. Most users should use train, which automatically determines the BMU and trains it.

incrementCounter :: Num t => SSOM f t k p -> SSOM f t k p Source

justTrain :: (Ord (Metric p), Pattern p, LearningFunction f, Metric p ~ LearningRate f, Num (LearningRate f), Ord k, Integral t) => SSOM f t k p -> p -> SSOM f t k p Source