Add colors to results of gridsearch

This commit is contained in:
Ricardo Montañana Gómez 2023-12-04 17:34:00 +01:00
parent 0723564e66
commit cc316bb8d3
Signed by: rmontanana
GPG Key ID: 46064262FD9A7ADE
2 changed files with 4 additions and 2 deletions

View File

@ -9,6 +9,7 @@ public:
static std::string YELLOW() { return "\033[1;33m"; }
static std::string RED() { return "\033[1;31m"; }
static std::string WHITE() { return "\033[1;37m"; }
static std::string IBLUE() { return "\033[0;94m"; }
static std::string RESET() { return "\033[0m"; }
};
#endif // COLORS_H

View File

@ -88,8 +88,9 @@ namespace platform {
// for dataset // for seed // for fold // for hyperparameters // for nested fold
tie(bestScore, bestHyperparameters) = processFileNested(dataset, datasets, combinations);
if (!config.quiet) {
std::cout << "end." << " Score: " << setw(9) << setprecision(7) << fixed
<< bestScore << " [" << bestHyperparameters.dump() << "]" << std::endl;
std::cout << "end." << " Score: " << Colors::IBLUE() << setw(9) << setprecision(7) << fixed
<< bestScore << Colors::BLUE() << " [" << bestHyperparameters.dump() << "]"
<< Colors::RESET() << ::endl;
}
json result = {
{ "score", bestScore },