| Copyright | (c) Fabricio Olivetti de Franca 2022 |
|---|---|
| License | GPL-3 |
| Maintainer | fabricio.olivetti@gmail.com |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | Safe-Inferred |
MachineLearning.Utils.Config
Description
Configuration parsing and report generation.
Synopsis
- allFunctions :: [Function]
- data Task
- = Regression
- | RegressionNL Int
- | Classification Int
- | ClassMult Int
- data Algorithm
- data Penalty
- data Output
- = Screen
- | PartialLog String
- | EvoLog String
- data Config = Conf {}
- data MutationCfg = MutCfg {}
- dfltMutCfg :: MutationCfg
- data IOCfg = IOCfg {
- _trainFilename :: String
- _testFilename :: String
- _logType :: Output
- data AlgorithmCfg = AlgCfg {}
- dfltAlgCfg :: AlgorithmCfg
- data ConstraintCfg = CnsCfg {
- _penaltyType :: Penalty
- _shapes :: [Shape]
- _domains :: [(Double, Double)]
- _evaluator :: Maybe Evaluator
- dfltCnstrCfg :: ConstraintCfg
- getLogType :: Config -> Output
- getSeed :: Config -> Maybe Int
- getTask :: Config -> Task
- getNPop :: Config -> Int
- getNGens :: Config -> Int
- getTrainName :: Config -> String
- getTestName :: Config -> String
- getDomains :: Config -> [(Double, Double)]
- getImage :: Config -> Maybe (Double, Double)
- getMeasures :: Config -> [Measure]
- getShapes :: Config -> [Shape]
- getPenalty :: Config -> Penalty
- readConfig :: String -> IO Config
- parseConfig :: IniParser Config
Documentation
allFunctions :: [Function] Source #
Task can be Regression, Classification and One-vs-All Classification
Constructors
| Regression | |
| RegressionNL Int | |
| Classification Int | |
| ClassMult Int |
Current algorithm implementation are traditional Evolutionary (GPTIR) and Feasible-Infeasible two-population for shape-constraint (SCTIR).
Type of penalty function
Output configuration
Constructors
| Screen | |
| PartialLog String | |
| EvoLog String |
Configuration data
Constructors
| Conf | |
Fields | |
data MutationCfg Source #
Mutation config
Constructors
| MutCfg | |
Instances
| Read MutationCfg Source # | |
Defined in MachineLearning.Utils.Config Methods readsPrec :: Int -> ReadS MutationCfg readList :: ReadS [MutationCfg] readPrec :: ReadPrec MutationCfg readListPrec :: ReadPrec [MutationCfg] | |
| Show MutationCfg Source # | |
Defined in MachineLearning.Utils.Config Methods showsPrec :: Int -> MutationCfg -> ShowS show :: MutationCfg -> String showList :: [MutationCfg] -> ShowS | |
Dataset and logging configs
Constructors
| IOCfg | |
Fields
| |
data AlgorithmCfg Source #
Algorithm configuration
Constructors
| AlgCfg | |
Instances
| Show AlgorithmCfg Source # | |
Defined in MachineLearning.Utils.Config Methods showsPrec :: Int -> AlgorithmCfg -> ShowS show :: AlgorithmCfg -> String showList :: [AlgorithmCfg] -> ShowS | |
data ConstraintCfg Source #
Constructors
| CnsCfg | |
Fields
| |
Instances
| Read ConstraintCfg Source # | |
Defined in MachineLearning.Utils.Config Methods readsPrec :: Int -> ReadS ConstraintCfg readList :: ReadS [ConstraintCfg] readPrec :: ReadPrec ConstraintCfg readListPrec :: ReadPrec [ConstraintCfg] | |
| Show ConstraintCfg Source # | |
Defined in MachineLearning.Utils.Config Methods showsPrec :: Int -> ConstraintCfg -> ShowS show :: ConstraintCfg -> String showList :: [ConstraintCfg] -> ShowS | |
getLogType :: Config -> Output Source #
getTrainName :: Config -> String Source #
getTestName :: Config -> String Source #
getDomains :: Config -> [(Double, Double)] Source #
getMeasures :: Config -> [Measure] Source #
getPenalty :: Config -> Penalty Source #
readConfig :: String -> IO Config Source #
parseConfig :: IniParser Config Source #
Read the config file and run the algorithm.