Learning-0.0.0: Most frequently used machine learning tools

Safe HaskellNone
LanguageHaskell2010

Learning

Contents

Description

Machine learning utilities

A micro library containing the most common machine learning tools. Check also the mltool package https://hackage.haskell.org/package/mltool.

Synopsis

Datasets

data Dataset a b Source #

Constructors

Dataset 

Fields

Principal component analysis

pca :: Int -> [Vector Double] -> PCA Source #

Principal component analysis (PCA)

Supervised learning

learn :: Storable a => Vector a -> Matrix Double -> Matrix Double -> Either String (Classifier a) Source #

Perform supervised learning to create a linear classifier. The ridge regression is run with regularization parameter mu=1e-4.

learn' :: Matrix Double -> Matrix Double -> Maybe (Matrix Double) Source #

Create a linear readout using the ridge regression

teacher :: Int -> Int -> Int -> Matrix Double Source #

Teacher matrix

scores :: Matrix Double -> Matrix Double -> Vector Double Source #

Evaluate the network state (nonlinear response) according to some readout matrix trW.

winnerTakesAll Source #

Arguments

:: Storable a 
=> Matrix Double

Transposed readout matrix

-> Vector a

Vector of possible classes

-> Classifier a

Classifier

Winner-takes-all classification method

Evaluation

errors :: Eq a => [(a, a)] -> [(a, a)] Source #

Returns the misclassified cases

errorRate :: (Eq a, Fractional err) => [a] -> [a] -> err Source #

Calculates the error rate in %