hsgsom-0.2.0: An implementation of the GSOM clustering algorithm.




The GSOM algorithm works on numerical input vectors. These input vectors are internally represented as lists of Doubles and this module contains the functions working on these.



type Bounds = [(Double, Double)]Source

The bounds of a list of inputs. Having the tuple (a,b) at index i in bounds means that the value at index i of each of the input vectors from the inputs which where used to calculate bounds is from the intervall [a,b].

type Input = [Double]Source

Input vectors are represented as lists of Doubles.

bounds :: Inputs -> BoundsSource

Calculates the bounds of the input vector components.

dimension :: Inputs -> IntSource

Calculating the dimension of a given set of inputs just means finding the length of the longest input vector.

normalize :: Bounds -> Inputs -> InputsSource

Normalizes input vectors. normalize inputs takes the given list of input vectors inputs and returns a list of input vectors where each component is in [0,1]. If you want to unnormalize the input vectors use bounds and unnormalize.

unnormalize :: Bounds -> Inputs -> InputsSource

Unnormalizes the given input vectors inputs assuming that it's bounds previously where bounds.

distance :: Input -> Input -> DoubleSource

distance i1 i2 calculates the euclidean distance between i1 and i2. If i1 and i2 have different lengths, excess values are ignored.

(.*) :: Double -> Input -> InputSource

Multiplication of an input vector with a scalar.

(<+>) :: Input -> Input -> InputSource

Subtraction and addition of vectors between each other.