Copyright | (c) Fabricio Olivetti de Franca 2020 |
---|---|
License | GPL-3 |
Maintainer | fabricio.olivetti@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
IT.Regression
Contents
Description
Definitions of IT data structure and support functions.
Synopsis
- data Task
- type FitFun = Vector -> Vector -> Double
- data Penalty
- predict :: Matrix Double -> Vector -> Vector
- solveOLS :: Matrix Double -> Vector -> Vector
- isInvalidMatrix :: Matrix Double -> Bool
- regress :: Matrix Double -> Vector -> [Vector]
- classify :: Matrix Double -> Vector -> [Vector]
- classifyMult :: Matrix Double -> Vector -> [Vector]
- fitTask :: Task -> Matrix Double -> Vector -> [Vector]
- predictTask :: Task -> Matrix Double -> [Vector] -> Vector
- evalPenalty :: Penalty -> Int -> Double -> Double
- applyMeasures :: NonEmpty Measure -> Vector -> Vector -> [Double]
- evalTrain :: Task -> NonEmpty Measure -> Constraint -> Penalty -> Dataset Double -> Vector -> Dataset Double -> Vector -> Expr -> Maybe Solution
- evalTest :: Task -> NonEmpty Measure -> Dataset Double -> Vector -> Solution -> Maybe [Double]
IT specific stuff
Constructors
Regression | |
Classification | |
ClassMult |
isInvalidMatrix :: Matrix Double -> Bool Source #
regress :: Matrix Double -> Vector -> [Vector] Source #
Applies OLS and returns a Solution if the expression is invalid, it returns Infinity as a fitness
classifyMult :: Matrix Double -> Vector -> [Vector] Source #
fitTask :: Task -> Matrix Double -> Vector -> [Vector] Source #
Fitness function for regression
Split the dataset into twice the available cores evaluate the expressions in parallel run a Linear regression on the evaluated expressions Remove from the population any expression that leads to NaNs or Infs it was fitnessReg
evalPenalty :: Penalty -> Int -> Double -> Double Source #