Copyright(c) Fabricio Olivetti de Franca 2022
LicenseGPL-3
Maintainerfabricio.olivetti@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe-Inferred

MachineLearning.Model.Fitness

Description

This module exports the functions that calculates the coefficients, evaluate the fitness, penalty and constraints of a TIR expression.

Synopsis

Documentation

evalTrain Source #

Arguments

:: 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.