From 0723564e66c4e753b6a07fc8f2cec8f6ab140952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Monta=C3=B1ana=20G=C3=B3mez?= Date: Sun, 3 Dec 2023 17:55:44 +0100 Subject: [PATCH] Fix some output in gridsearch --- src/Platform/GridSearch.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Platform/GridSearch.cc b/src/Platform/GridSearch.cc index 49c3a71..49b825b 100644 --- a/src/Platform/GridSearch.cc +++ b/src/Platform/GridSearch.cc @@ -235,7 +235,8 @@ namespace platform { if (!config.quiet) std::cout << "\b\b\b, \b" << flush; } - std::cout << string(3 * config.nested + 2 * spcs_combinations + 4, '\b') << flush; + int magic = 3 * config.nested + 2 * spcs_combinations + 4; + std::cout << string(magic, '\b') << string(magic, ' ') << string(magic, '\b') << flush; delete nested_fold; hypScore /= config.nested; if (hypScore > bestHypScore) { @@ -255,7 +256,7 @@ namespace platform { showProgressFold(nfold + 1, getColor(clf->getStatus()), "b"); double score = clf->score(X_test, y_test); if (!config.quiet) - std::cout << "\b\b\b\b\b, \b" << flush; + std::cout << string(2 * config.nested - 1, '\b') << "," << string(2 * config.nested, ' ') << string(2 * config.nested - 1, '\b') << flush; if (score > bestScore) { bestScore = score; bestHyperparameters = bestHypHyperparameters;