From eafc82c96a943f43a3207665ab93f2c831ce81a9 Mon Sep 17 00:00:00 2001 From: Alejandro Moreo Date: Fri, 4 Nov 2022 15:15:12 +0100 Subject: [PATCH] full example of training, model selection, and evaluation using the lequa2022 dataset with the new protocols --- examples/lequa2022_experiments.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/lequa2022_experiments.py b/examples/lequa2022_experiments.py index 91849e5..0df7d15 100644 --- a/examples/lequa2022_experiments.py +++ b/examples/lequa2022_experiments.py @@ -5,6 +5,7 @@ from data.datasets import LEQUA2022_SAMPLE_SIZE, fetch_lequa2022 from evaluation import evaluation_report from method.aggregative import EMQ from model_selection import GridSearchQ +import pandas as pd task = 'T1A' @@ -21,6 +22,8 @@ model_selection = GridSearchQ(quantifier, param_grid, protocol=val_generator, n_ quantifier = model_selection.fit(training) # evaluation -report = evaluation_report(quantifier, protocol=test_generator, error_metrics=['mae', 'mrae'], verbose=True) +report = evaluation_report(quantifier, protocol=test_generator, error_metrics=['mae', 'mrae', 'mkld'], verbose=True) +pd.set_option('display.max_columns', None) +pd.set_option('display.width', 1000) print(report)