From 401296293baf1acadddad917dbcd909b51a8b648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Montan=CC=83ana?= Date: Wed, 11 Dec 2024 23:18:20 +0100 Subject: [PATCH] Add header to b_main time --- lib/Files | 2 +- lib/argparse | 2 +- lib/catch2 | 2 +- lib/json | 2 +- lib/libxlsxwriter | 2 +- lib/mdlp | 2 +- src/commands/b_grid.cpp | 13 ++++++++++--- src/main/Experiment.cpp | 4 ++-- 8 files changed, 18 insertions(+), 11 deletions(-) diff --git a/lib/Files b/lib/Files index a531692..a4329f5 160000 --- a/lib/Files +++ b/lib/Files @@ -1 +1 @@ -Subproject commit a5316928d408266aa425f64131ab0f592b010a8d +Subproject commit a4329f5f9dfdb18ee3faa63bd5b665f2f253b8d2 diff --git a/lib/argparse b/lib/argparse index e462ab9..cbd9fd8 160000 --- a/lib/argparse +++ b/lib/argparse @@ -1 +1 @@ -Subproject commit e462ab980c0852bd1df2ee1f4ec81826246b6f21 +Subproject commit cbd9fd8ed675ed6a2ac1bd7142d318c6ad5d3462 diff --git a/lib/catch2 b/lib/catch2 index 4e8d92b..0321d2f 160000 --- a/lib/catch2 +++ b/lib/catch2 @@ -1 +1 @@ -Subproject commit 4e8d92bf02f7d1c8006a0e7a5ecabd8e62d98502 +Subproject commit 0321d2fce328b5e2ad106a8230ff20e0d5bf5501 diff --git a/lib/json b/lib/json index 960b763..e6cafa5 160000 --- a/lib/json +++ b/lib/json @@ -1 +1 @@ -Subproject commit 960b763ecd144f156d05ec61f577b04107290137 +Subproject commit e6cafa573aac6ed9227f752a5371c0b3f436307d diff --git a/lib/libxlsxwriter b/lib/libxlsxwriter index cf887d6..8206bda 160000 --- a/lib/libxlsxwriter +++ b/lib/libxlsxwriter @@ -1 +1 @@ -Subproject commit cf887d65ce31c74ce6fdc6f3c6163c1cc206e910 +Subproject commit 8206bda64ab66db608a920b09d35d163464aad1b diff --git a/lib/mdlp b/lib/mdlp index 2db60e0..2d8b949 160000 --- a/lib/mdlp +++ b/lib/mdlp @@ -1 +1 @@ -Subproject commit 2db60e007d70da876379373c53b6421f281daeac +Subproject commit 2d8b949abda93da41352d9d83569658e8df75567 diff --git a/src/commands/b_grid.cpp b/src/commands/b_grid.cpp index 2fe0367..6074a9d 100644 --- a/src/commands/b_grid.cpp +++ b/src/commands/b_grid.cpp @@ -93,8 +93,10 @@ void list_dump(std::string& model) if (item.first.size() > max_dataset) { max_dataset = item.first.size(); } - if (item.second.dump().size() > max_hyper) { - max_hyper = item.second.dump().size(); + for (auto const& [key, value] : item.second.items()) { + if (value.dump().size() > max_hyper) { + max_hyper = value.dump().size(); + } } } std::cout << Colors::GREEN() << left << " # " << left << setw(max_dataset) << "Dataset" << " #Com. " @@ -106,7 +108,12 @@ void list_dump(std::string& model) std::cout << color; auto num_combinations = data.getNumCombinations(item.first); std::cout << setw(3) << fixed << right << ++index << left << " " << setw(max_dataset) << item.first - << " " << setw(5) << right << num_combinations << " " << setw(max_hyper) << left << item.second.dump() << std::endl; + << " " << setw(5) << right << num_combinations << " "; + std::string prefix = ""; + for (auto const& [key, value] : item.second.items()) { + std::cout << prefix << setw(max_hyper) << std::left << value.dump() << std::endl; + prefix = string(11 + max_dataset, ' '); + } } std::cout << Colors::RESET() << std::endl; } diff --git a/src/main/Experiment.cpp b/src/main/Experiment.cpp index 65fced8..83716bf 100644 --- a/src/main/Experiment.cpp +++ b/src/main/Experiment.cpp @@ -58,8 +58,8 @@ namespace platform { std::cout << " ( " << Colors::GREEN() << "b" << Colors::RESET() << " ) Scoring train dataset" << std::endl; std::cout << " ( " << Colors::GREEN() << "c" << Colors::RESET() << " ) Scoring test dataset" << std::endl << std::endl; std::cout << Colors::YELLOW() << "Note: fold number in this color means fitting had issues such as not using all features in BoostAODE classifier" << std::endl << std::endl; - std::cout << Colors::GREEN() << left << " # " << setw(max_name) << "Dataset" << " #Samp #Feat Seed Status" << std::endl; - std::cout << " --- " << string(max_name, '-') << " ----- ----- ---- " << string(4 + 3 * nfolds, '-') << Colors::RESET() << std::endl; + std::cout << Colors::GREEN() << left << " # " << setw(max_name) << "Dataset" << " #Samp #Feat Seed Status" << string(3 * nfolds - 2, ' ') << " Time" << std::endl; + std::cout << " --- " << string(max_name, '-') << " ----- ----- ---- " << string(4 + 3 * nfolds, '-') << " ----------" << Colors::RESET() << std::endl; } int num = 0; for (auto fileName : filesToProcess) {