| Copyright | (c) Fabricio Olivetti de Franca 2020 | 
|---|---|
| License | GPL-3 | 
| Maintainer | fabricio.olivetti@gmail.com | 
| Stability | experimental | 
| Portability | POSIX | 
| Safe Haskell | None | 
ITEA.Config
Contents
Description
Configuration parsing and report generation.
Synopsis
- class Monoid a => Valid a b | a -> b, b -> a where
- validateConfig :: a -> b
 
 - data Param a
 - fromParam :: Param a -> a
 - data UncheckedMutationCfg = UMCfg {}
 - data MutationCfg = MCfg (Int, Int) (Int, Int) Int [Transformation] [String]
 - exponents :: Int -> Int -> UncheckedMutationCfg
 - termLimit :: Int -> Int -> UncheckedMutationCfg
 - nonzeroExps :: Int -> UncheckedMutationCfg
 - transFunctions :: [Transformation] -> UncheckedMutationCfg
 - measures :: [String] -> UncheckedMutationCfg
 - getMaxTerms :: MutationCfg -> Int
 - getMeasure :: MutationCfg -> [Measure]
 - parseFile :: String -> (Matrix Double, Vector)
 - withMutation :: MutationCfg -> Int -> (Mutation, Rnd Term)
 - data UncheckedDatasets = UD {}
 - data Datasets = D String String
 - trainingset :: String -> UncheckedDatasets
 - testset :: String -> UncheckedDatasets
 
Documentation
class Monoid a => Valid a b | a -> b, b -> a where Source #
Class of types that can be validate
Methods
validateConfig :: a -> b Source #
Instances
| Valid UncheckedDatasets Datasets Source # | |
Defined in ITEA.Config Methods  | |
| Valid UncheckedMutationCfg MutationCfg Source # | |
Defined in ITEA.Config Methods validateConfig :: UncheckedMutationCfg -> MutationCfg Source #  | |
A parameter is either empty (None) or Has something
data UncheckedMutationCfg Source #
Unchecked mutation config
Constructors
| UMCfg | |
Instances
| Semigroup UncheckedMutationCfg Source # | |
Defined in ITEA.Config Methods (<>) :: UncheckedMutationCfg -> UncheckedMutationCfg -> UncheckedMutationCfg sconcat :: NonEmpty UncheckedMutationCfg -> UncheckedMutationCfg stimes :: Integral b => b -> UncheckedMutationCfg -> UncheckedMutationCfg  | |
| Monoid UncheckedMutationCfg Source # | |
Defined in ITEA.Config  | |
| Valid UncheckedMutationCfg MutationCfg Source # | |
Defined in ITEA.Config Methods validateConfig :: UncheckedMutationCfg -> MutationCfg Source #  | |
data MutationCfg Source #
Validated mutation config
Constructors
| MCfg (Int, Int) (Int, Int) Int [Transformation] [String] | 
Instances
| Show MutationCfg Source # | |
Defined in ITEA.Config Methods showsPrec :: Int -> MutationCfg -> ShowS show :: MutationCfg -> String showList :: [MutationCfg] -> ShowS  | |
| Valid UncheckedMutationCfg MutationCfg Source # | |
Defined in ITEA.Config Methods validateConfig :: UncheckedMutationCfg -> MutationCfg Source #  | |
exponents :: Int -> Int -> UncheckedMutationCfg Source #
Generates a configuration with only _expLim holding a value.
termLimit :: Int -> Int -> UncheckedMutationCfg Source #
Generates a configuration with only _termLim holding a value.
nonzeroExps :: Int -> UncheckedMutationCfg Source #
Generates a configuration with only _nzExp holding a value.
transFunctions :: [Transformation] -> UncheckedMutationCfg Source #
Generates a configuration with only _transFun holding a value.
measures :: [String] -> UncheckedMutationCfg Source #
Generates a configuration with only _measures holding a value.
getMaxTerms :: MutationCfg -> Int Source #
getMeasure :: MutationCfg -> [Measure] Source #
parseFile :: String -> (Matrix Double, Vector) Source #
Parse a numerical csv file into predictors and target variables
withMutation :: MutationCfg -> Int -> (Mutation, Rnd Term) Source #
Creates the mutation function and also returns the random term generator (for initialization)
Datasets configuration
data UncheckedDatasets Source #
Instances
| Show UncheckedDatasets Source # | |
Defined in ITEA.Config Methods showsPrec :: Int -> UncheckedDatasets -> ShowS show :: UncheckedDatasets -> String showList :: [UncheckedDatasets] -> ShowS  | |
| Semigroup UncheckedDatasets Source # | |
Defined in ITEA.Config Methods (<>) :: UncheckedDatasets -> UncheckedDatasets -> UncheckedDatasets sconcat :: NonEmpty UncheckedDatasets -> UncheckedDatasets stimes :: Integral b => b -> UncheckedDatasets -> UncheckedDatasets  | |
| Monoid UncheckedDatasets Source # | |
Defined in ITEA.Config Methods mappend :: UncheckedDatasets -> UncheckedDatasets -> UncheckedDatasets  | |
| Valid UncheckedDatasets Datasets Source # | |
Defined in ITEA.Config Methods  | |
Constructors
| D String String | 
Instances
| Show Datasets Source # | |
| Valid UncheckedDatasets Datasets Source # | |
Defined in ITEA.Config Methods  | |
trainingset :: String -> UncheckedDatasets Source #
sets the training and test data set names
testset :: String -> UncheckedDatasets Source #
sets the training and test data set names