handle metric ordering

This commit is contained in:
Filip Gralinski 2015-12-12 08:14:13 +01:00 committed by Filip Gralinski
parent e152f5f5ab
commit 995beb6dbc
2 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,5 @@
name: geval name: geval
version: 0.2.0.0 version: 0.2.1.0
synopsis: Machine learning evaluation tools synopsis: Machine learning evaluation tools
description: Please see README.md description: Please see README.md
homepage: http://github.com/name/project homepage: http://github.com/name/project

View File

@ -40,6 +40,14 @@ type MetricValue = Double
data Metric = RMSE | MSE | BLEU | Accuracy data Metric = RMSE | MSE | BLEU | Accuracy
deriving (Show, Read) deriving (Show, Read)
data MetricOrdering = TheLowerTheBetter | TheHigherTheBetter
getMetricOrdering :: Metric -> MetricOrdering
getMetricOrdering RMSE = TheLowerTheBetter
getMetricOrdering MSE = TheLowerTheBetter
getMetricOrdering BLEU = TheHigherTheBetter
getMetricOrdering Accuracy = TheHigherTheBetter
defaultOutDirectory = "." defaultOutDirectory = "."
defaultTestName = "test-A" defaultTestName = "test-A"
defaultOutFile = "out.tsv" defaultOutFile = "out.tsv"