Portability | portable |
---|---|
Stability | experimental |
Maintainer | lennart...schmitt@<nospam>gmail.com |
This module implements some linear discriminant analysis functions. Imagine you've made a poll and now you have values/attributes from every subscriber. Further more you've grouped the subscribers into clusters. The poll-datas are structured as follows:
- poll-data of one subscriber = [value] --> Vector value
- poll-data of one cluster/group of subscribers = [[values]] --> Matrix values
- poll-data of all clusters/groups = [[[values]]] --> MatrixList values
Now you want to check if you clustered right and/or how significant the values you asked for are...
- fisher :: RawMatrixList Double -> RawVector Double -> Int
- fisher' :: RawVector (LinFunction Double) -> RawVector Double -> Int
- fisherT :: RawVector (Int, LinFunction Double) -> RawVector Double -> Int
- fisherAll :: RawMatrixList Double -> RawMatrix Int
- fisherClassificationFunction :: RawMatrixList Double -> RawVector (LinFunction Double)
- aprioriProbability :: RawMatrixList Double -> RawVector Double
- discriminantCriteria :: RawMatrixList Double -> RawVector Double
- isolatedDiscriminant :: RawMatrixList Double -> RawVector Double
Documentation
fisher :: RawMatrixList Double -> RawVector Double -> IntSource
Calculation of the classification of a survey (or attributes) in a cluster. The function takes a vectorlist of attributesvalues and a context. The context consists of groupsclusters and its items valuesattributes. The function returns the ID (starting with 0) of the cluster to which the given vector/list belongs to. This function uses the Fisher algorithm.
fisher' :: RawVector (LinFunction Double) -> RawVector Double -> IntSource
Calculates the ID (starting with 0) of the cluster the given list of attributes belongs to. The function takes a list of attributes and a list of clusters which are representated by there classification function. This function uses the Fisher algorithm.
fisherT :: RawVector (Int, LinFunction Double) -> RawVector Double -> IntSource
Calculates the ID of the cluster the given values belonging to. This function takes a list of clusters, representated by a tuple, and a list of values. The cluster-tuples consists of a ID of the cluster and the classification function (according to Fisher) of the cluster. This function uses the Fisher algorithm.
fisherAll :: RawMatrixList Double -> RawMatrix IntSource
Calculates the cluster of every survey of a poll. This function takes the data of a whole poll and classifies every survey of the poll. This function uses the Fisher algorithm.
fisherClassificationFunction :: RawMatrixList Double -> RawVector (LinFunction Double)Source
Calculates the classification function according to Fisher.
aprioriProbability :: RawMatrixList Double -> RawVector DoubleSource
Calculation of the a priori probability, more precisely the probability that an element belongs to a group.
discriminantCriteria :: RawMatrixList Double -> RawVector DoubleSource
Calculates the discriminant criteria.
isolatedDiscriminant :: RawMatrixList Double -> RawVector DoubleSource
Calculates the isolated discriminants of every attribute.
isolatedDiscriminant [[[-1,1],[2,2]],[[1,3],[4,8]]] == [0.4444444444444444,1.2307692307692308]