From 402ed7311111ee0860023a7f0158130271e10140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Grali=C5=84ski?= Date: Sat, 2 Nov 2019 11:53:52 +0100 Subject: [PATCH] Add option for bootstrap resampling (not implemented yet) --- src/GEval/Core.hs | 6 ++++-- src/GEval/OptionsParser.hs | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/GEval/Core.hs b/src/GEval/Core.hs index 89bb99a..6119dd5 100644 --- a/src/GEval/Core.hs +++ b/src/GEval/Core.hs @@ -168,7 +168,8 @@ data GEvalSpecification = GEvalSpecification gesGonitoHost :: Maybe String, gesToken :: Maybe String, gesGonitoGitAnnexRemote :: Maybe String, - gesReferences :: Maybe String } + gesReferences :: Maybe String, + gesBootstrapSampling :: Maybe Int } gesMainMetric :: GEvalSpecification -> Metric @@ -216,7 +217,8 @@ defaultGEvalSpecification = GEvalSpecification { gesGonitoHost = Nothing, gesToken = Nothing, gesGonitoGitAnnexRemote = Nothing, - gesReferences = Nothing} + gesReferences = Nothing, + gesBootstrapSampling = Nothing } isEmptyFile :: FilePath -> IO (Bool) isEmptyFile path = do diff --git a/src/GEval/OptionsParser.hs b/src/GEval/OptionsParser.hs index d0b46a9..9797123 100644 --- a/src/GEval/OptionsParser.hs +++ b/src/GEval/OptionsParser.hs @@ -196,6 +196,12 @@ specParser = GEvalSpecification <> help "External text file referenced" ) ) + <*> ( optional $ option auto + (long "bootstrap-resampling" + <> short 'B' + <> metavar "NUMBER-OF-SAMPLES" + <> help "Tests on NUMBER-OF-SAMPLES bootstrap samples rather than just on the whole test set" )) + defaultMinFrequency :: Integer defaultMinFrequency = 1