Safe Haskell | None |
---|---|

Language | Haskell2010 |

# Various utilities for running MEP algorithm

- generateCode :: Phenotype Double -> String
- evaluateChromosome :: Num a => Chromosome a -> Vector a -> Vector a
- regressionLoss1 :: (Num result, Ord result) => (b -> b -> result) -> [(a, b)] -> (Vector a -> Vector b) -> (Vector Int, result)
- avgLoss :: Generation Double -> Double

# Documentation

generateCode :: Phenotype Double -> String Source

Generate code for the functions with a single output

:: Num a | |

=> Chromosome a | Chromosome to evaluate |

-> Vector a | Variable values |

-> Vector a | Resulting vector of multiple evaluations |

Evaluate each subexpression in a chromosome

:: (Num result, Ord result) | |

=> (b -> b -> result) | Distance function |

-> [(a, b)] | Dataset |

-> (Vector a -> Vector b) | Chromosome evaluation function (partially applied |

-> (Vector Int, result) |

Loss function for regression problems with one input and one output. Not normalized with respect to the dataset size.

avgLoss :: Generation Double -> Double Source

Average population loss