__init__.py 659 Bytes
Newer Older
lintangsutawika's avatar
lintangsutawika committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from . import metrics

METRIC_REGISTRY = {
    "matthews_corrcoef": metrics.matthews_corrcoef,
    "f1_score": metrics.f1_score,
    "perplexity": metrics.perplexity,
    "bleu": metrics.bleu,
    "chrf": metrics.chrf,
    "ter": metrics.ter,
}

AGGREGATION_REGISTRY = {
    "mean": metrics.mean,
    "median": metrics.median,
    "perplexity": metrics.perplexity,
}

HIGHER_IS_BETTER_REGISTRY = {
    "matthews_corrcoef": True,
    "f1_score": True,
    "perplexity": False,
    "bleu": True,
    "chrf": True,
    "ter": False,
25
26
27

    "acc": True,
    "acc_norm": True,
haileyschoelkopf's avatar
haileyschoelkopf committed
28
29
30
    "word_perplexity": False,
    "byte_perplexity": False,
    "bits_per_byte": False,
lintangsutawika's avatar
lintangsutawika committed
31
}