Skip to content

Latest commit

 

History

History
63 lines (55 loc) · 2.5 KB

metrics.md

File metadata and controls

63 lines (55 loc) · 2.5 KB

Change evaluation metrics

back to main README

MaChAmp supports a variety of metrics for task types. Specifically:

You can set/check the default metrics used for each task in the parameters configuration file ( default=configs/params.json). Alternatively, you can set the 'metric' keyword per task. To use micro-f1 for POS tagging for example:

{
    "UD": {
        "train_data_path": "data/ewt.train",
        "dev_data_path": "data/ewt.dev",
        "word_idx": 1,
        "tasks": {
            "upos": {
                "task_type": "seq",
                "column_idx": 3,
                "metric": "f1_micro"
            }
        }
    }
}

Note: sometimes it is desirable to have multiple metrics logged, for instance if you want to optimize for text classification using macro-f1 but also know the micro-f1 and accuracy scores. To do so, just add a (per-task) additional_metrics key with either a list of metric names (list of strings) or just a metric name (string):

{
    "UD": {
        "train_data_path": "data/ewt.train",
        "dev_data_path": "data/ewt.dev",
        "word_idx": 1,
        "tasks": {
            "upos": {
                "task_type": "seq",
                "column_idx": 3,
                "metric": "f1_micro",
                "additional_metrics": ["f1_micro", "accuracy"] // or "additional_metrics": "f1_micro"
            }
        }
    }
}