Normalise is a module in the HasGP Gaussian process library. It contains functions for performing basic normalisation tasks on training examples, and for computing assorted standard statistics.
Copyright (C) 2011 Sean Holden. sbh11@cl.cam.ac.uk.
- exampleMean :: Inputs -> DVector
- exampleVariance :: Inputs -> DVector
- exampleMeanVariance :: Inputs -> (DVector, DVector)
- normaliseMeanVariance :: DVector -> DVector -> Inputs -> Inputs
- normaliseMeanVarianceSimple :: Double -> Double -> Inputs -> Inputs
- normaliseBetweenLimits :: Double -> Double -> Inputs -> Inputs
- findRedundantAttributes :: Inputs -> [Bool]
- listRedundantAttributes :: Inputs -> [Int]
- removeRedundantAttributes :: Inputs -> Inputs
- retainAttributes :: [Int] -> Inputs -> Inputs
- confusionMatrix :: Targets -> Outputs -> (Double, Double, Double, Double)
- printConfusionMatrix :: Targets -> Outputs -> IO ()
- countLabels :: Targets -> IO ()
Documentation
Compute the mean for each attribute in a set of examples.
Compute the variance for each attribute in a set of examples.
Compute the mean and variance for each attribute in a set of examples.
:: DVector | Vector of new means required |
-> DVector | Vector of new variances required |
-> Inputs | Matrix - one row per example |
-> Inputs | Normalised matrix |
Normalise a set of examples to have specified mean and variance.
normaliseMeanVarianceSimpleSource
:: Double | New mean required |
-> Double | New variance required |
-> Inputs | Matrix - one row per example |
-> Inputs | Normalised matrix |
The same as normaliseMeanVariance but every column (attribute) is normalised in the same way.
:: Double | New min required |
-> Double | New max required |
-> Inputs | Matrix - one row per example |
-> Inputs | Normalised matrix |
Normalise a set of examples to have specified maximum and minimum.
Find the columns of a matrix in which all values are equal.
List column numbers for redundant attributes.
removeRedundantAttributesSource
Remove any redundant columns from a matrix.
:: [Int] | List of columns to keep. |
-> Inputs | Matrix - one row per example |
-> Inputs | Modified matrix - one row per example |
Specify a list of columns (matrix numbered from 1). Produce a matrix with ONLY those columns in the order specified in the list.
confusionMatrix :: Targets -> Outputs -> (Double, Double, Double, Double)Source
Compute the numbers for the confusion matrix. It is assumed that classes are +1 (positive) and -1 (negative). Result is (a,b,c,d): a - correct negatives b - predict positive when correct is negative c - predict negative when correct is positive d - correct positives
Print the confusion matrix and some other statistics
countLabels :: Targets -> IO ()Source
Assuming the labels are +1 or -1, count how many there are of each.