From 8a9342c97b52762582ec9b592718643b5e49408a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Monta=C3=B1ana?= Date: Thu, 17 Nov 2022 09:41:17 +0100 Subject: [PATCH] Add space to time column in report --- benchmark/Results.py | 6 ++-- benchmark/tests/test_files/be_main_best.test | 28 ++++++++--------- .../tests/test_files/be_main_complete.test | 28 ++++++++--------- .../tests/test_files/be_main_dataset.test | 26 ++++++++-------- benchmark/tests/test_files/be_main_grid.test | 28 ++++++++--------- benchmark/tests/test_files/report.test | 28 ++++++++--------- .../tests/test_files/report_compared.test | 30 +++++++++---------- 7 files changed, 87 insertions(+), 87 deletions(-) diff --git a/benchmark/Results.py b/benchmark/Results.py index 655e709..ca0353e 100644 --- a/benchmark/Results.py +++ b/benchmark/Results.py @@ -130,7 +130,7 @@ class BaseReport(abc.ABC): class Report(BaseReport): - header_lengths = [30, 6, 5, 3, 7, 7, 7, 15, 16, 15] + header_lengths = [30, 6, 5, 3, 7, 7, 7, 15, 17, 15] header_cols = [ "Dataset", "Sampl.", @@ -189,7 +189,7 @@ class Report(BaseReport): ) i += 1 print( - f"{result['time']:9.6f}±{result['time_std']:6.4f} ", + f"{result['time']:10.6f}±{result['time_std']:6.4f} ", end="", ) i += 1 @@ -1490,7 +1490,7 @@ class Summary: "again, number to report): ", end="", ) - num = self.get_input() + num = get_input() if num == "n": return if num == "r": diff --git a/benchmark/tests/test_files/be_main_best.test b/benchmark/tests/test_files/be_main_best.test index adecb4c..a18372b 100644 --- a/benchmark/tests/test_files/be_main_best.test +++ b/benchmark/tests/test_files/be_main_best.test @@ -1,16 +1,16 @@ -************************************************************************************************************************ -* STree ver. 1.2.4 Python ver. 3.11x with 5 Folds cross validation and 10 random seeds. 2022-05-09 00:15:25 * -* test * -* Random seeds: [57, 31, 1714, 17, 23, 79, 83, 97, 7, 1] Stratified: False * -* Execution took 0.80 seconds, 0.00 hours, on iMac27 * -* Score is accuracy * -************************************************************************************************************************ +************************************************************************************************************************* +* STree ver. 1.2.4 Python ver. 3.11x with 5 Folds cross validation and 10 random seeds. 2022-05-09 00:15:25 * +* test * +* Random seeds: [57, 31, 1714, 17, 23, 79, 83, 97, 7, 1] Stratified: False * +* Execution took 0.80 seconds, 0.00 hours, on iMac27 * +* Score is accuracy * +************************************************************************************************************************* -Dataset Sampl. Feat. Cls Nodes Leaves Depth Score Time Hyperparameters -============================== ====== ===== === ======= ======= ======= =============== ================ =============== -balance-scale 625 4 3 23.32 12.16 6.44 0.840160±0.0304 0.013745±0.0019 {'splitter': 'best', 'max_features': 'auto'} -balloons 16 4 2 3.00 2.00 2.00 0.860000±0.2850 0.000388±0.0000 {'C': 7, 'gamma': 0.1, 'kernel': 'rbf', 'max_iter': 10000.0, 'multiclass_strategy': 'ovr'} -************************************************************************************************************************ -* accuracy compared to STree_default (liblinear-ovr) .: 0.0422 * -************************************************************************************************************************ +Dataset Sampl. Feat. Cls Nodes Leaves Depth Score Time Hyperparameters +============================== ====== ===== === ======= ======= ======= =============== ================= =============== +balance-scale 625 4 3 23.32 12.16 6.44 0.840160±0.0304 0.013745±0.0019 {'splitter': 'best', 'max_features': 'auto'} +balloons 16 4 2 3.00 2.00 2.00 0.860000±0.2850 0.000388±0.0000 {'C': 7, 'gamma': 0.1, 'kernel': 'rbf', 'max_iter': 10000.0, 'multiclass_strategy': 'ovr'} +************************************************************************************************************************* +* accuracy compared to STree_default (liblinear-ovr) .: 0.0422 * +************************************************************************************************************************* Results in results/results_accuracy_STree_iMac27_2022-05-09_00:15:25_0.json diff --git a/benchmark/tests/test_files/be_main_complete.test b/benchmark/tests/test_files/be_main_complete.test index 8f36fe6..edbfead 100644 --- a/benchmark/tests/test_files/be_main_complete.test +++ b/benchmark/tests/test_files/be_main_complete.test @@ -1,16 +1,16 @@ -************************************************************************************************************************ -* STree ver. 1.2.4 Python ver. 3.11x with 5 Folds cross validation and 10 random seeds. 2022-05-08 20:14:43 * -* test * -* Random seeds: [57, 31, 1714, 17, 23, 79, 83, 97, 7, 1] Stratified: False * -* Execution took 0.48 seconds, 0.00 hours, on iMac27 * -* Score is accuracy * -************************************************************************************************************************ +************************************************************************************************************************* +* STree ver. 1.2.4 Python ver. 3.11x with 5 Folds cross validation and 10 random seeds. 2022-05-08 20:14:43 * +* test * +* Random seeds: [57, 31, 1714, 17, 23, 79, 83, 97, 7, 1] Stratified: False * +* Execution took 0.48 seconds, 0.00 hours, on iMac27 * +* Score is accuracy * +************************************************************************************************************************* -Dataset Sampl. Feat. Cls Nodes Leaves Depth Score Time Hyperparameters -============================== ====== ===== === ======= ======= ======= =============== ================ =============== -balance-scale 625 4 3 17.36 9.18 6.18 0.908480±0.0247 0.007388±0.0013 {} -balloons 16 4 2 4.64 2.82 2.66 0.663333±0.3009 0.000664±0.0002 {} -************************************************************************************************************************ -* accuracy compared to STree_default (liblinear-ovr) .: 0.0390 * -************************************************************************************************************************ +Dataset Sampl. Feat. Cls Nodes Leaves Depth Score Time Hyperparameters +============================== ====== ===== === ======= ======= ======= =============== ================= =============== +balance-scale 625 4 3 17.36 9.18 6.18 0.908480±0.0247 0.007388±0.0013 {} +balloons 16 4 2 4.64 2.82 2.66 0.663333±0.3009 0.000664±0.0002 {} +************************************************************************************************************************* +* accuracy compared to STree_default (liblinear-ovr) .: 0.0390 * +************************************************************************************************************************* Results in results/results_accuracy_STree_iMac27_2022-05-08_20:14:43_0.json diff --git a/benchmark/tests/test_files/be_main_dataset.test b/benchmark/tests/test_files/be_main_dataset.test index 46e50e3..3fedf46 100644 --- a/benchmark/tests/test_files/be_main_dataset.test +++ b/benchmark/tests/test_files/be_main_dataset.test @@ -1,15 +1,15 @@ -************************************************************************************************************************ -* STree ver. 1.2.4 Python ver. 3.11x with 5 Folds cross validation and 10 random seeds. 2022-05-08 19:38:28 * -* test * -* Random seeds: [57, 31, 1714, 17, 23, 79, 83, 97, 7, 1] Stratified: False * -* Execution took 0.06 seconds, 0.00 hours, on iMac27 * -* Score is accuracy * -************************************************************************************************************************ +************************************************************************************************************************* +* STree ver. 1.2.4 Python ver. 3.11x with 5 Folds cross validation and 10 random seeds. 2022-05-08 19:38:28 * +* test * +* Random seeds: [57, 31, 1714, 17, 23, 79, 83, 97, 7, 1] Stratified: False * +* Execution took 0.06 seconds, 0.00 hours, on iMac27 * +* Score is accuracy * +************************************************************************************************************************* -Dataset Sampl. Feat. Cls Nodes Leaves Depth Score Time Hyperparameters -============================== ====== ===== === ======= ======= ======= =============== ================ =============== -balloons 16 4 2 4.64 2.82 2.66 0.663333±0.3009 0.000671±0.0001 {} -************************************************************************************************************************ -* accuracy compared to STree_default (liblinear-ovr) .: 0.0165 * -************************************************************************************************************************ +Dataset Sampl. Feat. Cls Nodes Leaves Depth Score Time Hyperparameters +============================== ====== ===== === ======= ======= ======= =============== ================= =============== +balloons 16 4 2 4.64 2.82 2.66 0.663333±0.3009 0.000671±0.0001 {} +************************************************************************************************************************* +* accuracy compared to STree_default (liblinear-ovr) .: 0.0165 * +************************************************************************************************************************* Partial result file removed: results/results_accuracy_STree_iMac27_2022-05-08_19:38:28_0.json diff --git a/benchmark/tests/test_files/be_main_grid.test b/benchmark/tests/test_files/be_main_grid.test index c29ec32..adcf79a 100644 --- a/benchmark/tests/test_files/be_main_grid.test +++ b/benchmark/tests/test_files/be_main_grid.test @@ -1,16 +1,16 @@ -************************************************************************************************************************ -* STree ver. 1.2.4 Python ver. 3.11x with 5 Folds cross validation and 10 random seeds. 2022-05-09 00:21:06 * -* test * -* Random seeds: [57, 31, 1714, 17, 23, 79, 83, 97, 7, 1] Stratified: False * -* Execution took 0.89 seconds, 0.00 hours, on iMac27 * -* Score is accuracy * -************************************************************************************************************************ +************************************************************************************************************************* +* STree ver. 1.2.4 Python ver. 3.11x with 5 Folds cross validation and 10 random seeds. 2022-05-09 00:21:06 * +* test * +* Random seeds: [57, 31, 1714, 17, 23, 79, 83, 97, 7, 1] Stratified: False * +* Execution took 0.89 seconds, 0.00 hours, on iMac27 * +* Score is accuracy * +************************************************************************************************************************* -Dataset Sampl. Feat. Cls Nodes Leaves Depth Score Time Hyperparameters -============================== ====== ===== === ======= ======= ======= =============== ================ =============== -balance-scale 625 4 3 26.12 13.56 7.94 0.910720±0.0249 0.015852±0.0027 {'C': 1.0, 'kernel': 'liblinear', 'multiclass_strategy': 'ovr'} -balloons 16 4 2 4.64 2.82 2.66 0.663333±0.3009 0.000640±0.0001 {'C': 1.0, 'kernel': 'linear', 'multiclass_strategy': 'ovr'} -************************************************************************************************************************ -* accuracy compared to STree_default (liblinear-ovr) .: 0.0391 * -************************************************************************************************************************ +Dataset Sampl. Feat. Cls Nodes Leaves Depth Score Time Hyperparameters +============================== ====== ===== === ======= ======= ======= =============== ================= =============== +balance-scale 625 4 3 26.12 13.56 7.94 0.910720±0.0249 0.015852±0.0027 {'C': 1.0, 'kernel': 'liblinear', 'multiclass_strategy': 'ovr'} +balloons 16 4 2 4.64 2.82 2.66 0.663333±0.3009 0.000640±0.0001 {'C': 1.0, 'kernel': 'linear', 'multiclass_strategy': 'ovr'} +************************************************************************************************************************* +* accuracy compared to STree_default (liblinear-ovr) .: 0.0391 * +************************************************************************************************************************* Results in results/results_accuracy_STree_iMac27_2022-05-09_00:21:06_0.json diff --git a/benchmark/tests/test_files/report.test b/benchmark/tests/test_files/report.test index 47d4a1a..0e5ffa9 100644 --- a/benchmark/tests/test_files/report.test +++ b/benchmark/tests/test_files/report.test @@ -1,15 +1,15 @@ -************************************************************************************************************************ -* STree ver. 1.2.3 Python ver. 3.11x with 5 Folds cross validation and 10 random seeds. 2021-09-30 11:42:07 * -* With gridsearched hyperparameters * -* Random seeds: [57, 31, 1714, 17, 23, 79, 83, 97, 7, 1] Stratified: False * -* Execution took 624.25 seconds, 0.17 hours, on iMac27 * -* Score is accuracy * -************************************************************************************************************************ +************************************************************************************************************************* +* STree ver. 1.2.3 Python ver. 3.11x with 5 Folds cross validation and 10 random seeds. 2021-09-30 11:42:07 * +* With gridsearched hyperparameters * +* Random seeds: [57, 31, 1714, 17, 23, 79, 83, 97, 7, 1] Stratified: False * +* Execution took 624.25 seconds, 0.17 hours, on iMac27 * +* Score is accuracy * +************************************************************************************************************************* -Dataset Sampl. Feat. Cls Nodes Leaves Depth Score Time Hyperparameters -============================== ====== ===== === ======= ======= ======= =============== ================ =============== -balance-scale 625 4 3 7.00 4.00 3.00 0.970560±0.0150 0.014049±0.0020 {'C': 10000.0, 'gamma': 0.1, 'kernel': 'rbf', 'max_iter': 10000.0, 'multiclass_strategy': 'ovr'} -balloons 16 4 2 3.00 2.00 2.00 0.860000±0.2850 0.000854±0.0000 {'C': 7, 'gamma': 0.1, 'kernel': 'rbf', 'max_iter': 10000.0, 'multiclass_strategy': 'ovr'} -************************************************************************************************************************ -* accuracy compared to STree_default (liblinear-ovr) .: 0.0454 * -************************************************************************************************************************ +Dataset Sampl. Feat. Cls Nodes Leaves Depth Score Time Hyperparameters +============================== ====== ===== === ======= ======= ======= =============== ================= =============== +balance-scale 625 4 3 7.00 4.00 3.00 0.970560±0.0150 0.014049±0.0020 {'C': 10000.0, 'gamma': 0.1, 'kernel': 'rbf', 'max_iter': 10000.0, 'multiclass_strategy': 'ovr'} +balloons 16 4 2 3.00 2.00 2.00 0.860000±0.2850 0.000854±0.0000 {'C': 7, 'gamma': 0.1, 'kernel': 'rbf', 'max_iter': 10000.0, 'multiclass_strategy': 'ovr'} +************************************************************************************************************************* +* accuracy compared to STree_default (liblinear-ovr) .: 0.0454 * +************************************************************************************************************************* diff --git a/benchmark/tests/test_files/report_compared.test b/benchmark/tests/test_files/report_compared.test index 018e3ee..103fb5d 100644 --- a/benchmark/tests/test_files/report_compared.test +++ b/benchmark/tests/test_files/report_compared.test @@ -1,16 +1,16 @@ -************************************************************************************************************************ -* STree ver. 1.2.3 Python ver. 3.11x with 5 Folds cross validation and 10 random seeds. 2021-09-30 11:42:07 * -* With gridsearched hyperparameters * -* Random seeds: [57, 31, 1714, 17, 23, 79, 83, 97, 7, 1] Stratified: False * -* Execution took 624.25 seconds, 0.17 hours, on iMac27 * -* Score is accuracy * -************************************************************************************************************************ +************************************************************************************************************************* +* STree ver. 1.2.3 Python ver. 3.11x with 5 Folds cross validation and 10 random seeds. 2021-09-30 11:42:07 * +* With gridsearched hyperparameters * +* Random seeds: [57, 31, 1714, 17, 23, 79, 83, 97, 7, 1] Stratified: False * +* Execution took 624.25 seconds, 0.17 hours, on iMac27 * +* Score is accuracy * +************************************************************************************************************************* -Dataset Sampl. Feat. Cls Nodes Leaves Depth Score Time Hyperparameters -============================== ====== ===== === ======= ======= ======= =============== ================ =============== -balance-scale 625 4 3 7.00 4.00 3.00 0.970560±0.0150 0.014049±0.0020 {'C': 10000.0, 'gamma': 0.1, 'kernel': 'rbf', 'max_iter': 10000.0, 'multiclass_strategy': 'ovr'} -balloons 16 4 2 3.00 2.00 2.00 0.860000±0.2850✔ 0.000854±0.0000 {'C': 7, 'gamma': 0.1, 'kernel': 'rbf', 'max_iter': 10000.0, 'multiclass_strategy': 'ovr'} -************************************************************************************************************************ -* ✔ Equal to best .....: 1 * -* accuracy compared to STree_default (liblinear-ovr) .: 0.0454 * -************************************************************************************************************************ +Dataset Sampl. Feat. Cls Nodes Leaves Depth Score Time Hyperparameters +============================== ====== ===== === ======= ======= ======= =============== ================= =============== +balance-scale 625 4 3 7.00 4.00 3.00 0.970560±0.0150 0.014049±0.0020 {'C': 10000.0, 'gamma': 0.1, 'kernel': 'rbf', 'max_iter': 10000.0, 'multiclass_strategy': 'ovr'} +balloons 16 4 2 3.00 2.00 2.00 0.860000±0.2850✔ 0.000854±0.0000 {'C': 7, 'gamma': 0.1, 'kernel': 'rbf', 'max_iter': 10000.0, 'multiclass_strategy': 'ovr'} +************************************************************************************************************************* +* ✔ Equal to best .....: 1 * +* accuracy compared to STree_default (liblinear-ovr) .: 0.0454 * +*************************************************************************************************************************