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
version: 0.2.0.0
version: 0.2.1.0
synopsis: Machine learning evaluation tools
description: Please see README.md
homepage: http://github.com/name/project

View File

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