Copyright | (c) Fabricio Olivetti de Franca 2022 |
---|---|
License | GPL-3 |
Maintainer | fabricio.olivetti@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
This module exports the functions that calculates the coefficients, evaluate the fitness, penalty and constraints of a TIR expression.
Synopsis
- evalTrain :: Task -> Bool -> [Measure] -> Constraint -> Penalty -> Vector (Kaucher Double) -> Dataset Double -> Vector Double -> Dataset Double -> Vector Double -> Individual -> Individual
- evalTest :: Task -> [Measure] -> Dataset Double -> Vector Double -> Individual -> Maybe [Double]
- selectValidTerms :: TIR -> Vector (Kaucher Double) -> TIR
Documentation
:: Task | Regression or Classification task |
-> Bool | if we are fitting the final best individual, in this case do not split the training data for validation |
-> [Measure] | list of performance measures to calculate |
-> Constraint | constraint function |
-> Penalty | penalty |
-> Vector (Kaucher Double) | variable domains represented as a Kaucher Interval |
-> Dataset Double | training data |
-> Vector Double | training target |
-> Dataset Double | validation data |
-> Vector Double | validation target |
-> Individual | |
-> Individual |
evaluates an individual first fitting the expression with either OLS or a nonlinear optimization (not yet implemented) and calculating the fitness vector, constraints, penalty.
evalTest :: Task -> [Measure] -> Dataset Double -> Vector Double -> Individual -> Maybe [Double] Source #
Evaluates an expression into the test set. This is different from fitnessReg
since
it doesn't apply OLS.
selectValidTerms :: TIR -> Vector (Kaucher Double) -> TIR Source #
removes invalid terms from the TIR expression. Invalid terms
are those that evaluate to NaN
or Infinite
within the
domains of each variable. The domains are either provided by
the configuration file or estimated using the training data.