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

MachineLearning.Utils.Report

Description

Report generation.

Synopsis

Documentation

createIfDoesNotExist :: FilePath -> IO Handle Source #

Creates a file if it does not exist

writeChampionStats :: Config -> (Individual -> Maybe [Double]) -> Int64 -> Individual -> IO () Source #

writes all the stats from the final champion solution

writeStats :: FilePath -> (Individual -> Maybe [Double]) -> [Measure] -> Int64 -> Individual -> IO () Source #

writes the stats to a file

writeCfg :: FilePath -> Config -> IO () Source #

creates a report file

writeExprs :: Task -> FilePath -> Individual -> IO () Source #

pretty write the expressions

evoLog :: Handle -> (Individual -> Maybe [Double]) -> Population Individual -> IO () Source #

creates a log of the evolution process

getStats :: [Double] -> [Double] Source #

statsToStr :: Show a => [a] -> String Source #

replaceWithNan :: Maybe [Double] -> Double Source #

openNext :: String -> IO Handle Source #

Opens the first file available in the format "name.{i}.csv" where i follows a sequence from 0 onward.

postAgg :: [Double] -> [Double] Source #

aggregate :: [Double] -> Double -> [Double] Source #

aggregates the best, worst and average solutions

createLogName :: Config -> FilePath Source #

creates a log name instead of overwritting last one

makeLogger :: Config -> (Individual -> Maybe [Double]) -> IO (Population Individual -> IO (), Maybe Handle) Source #

creates an IO logger function

closeIfJust :: Maybe Handle -> IO () Source #

closes a file