Remove build & report parameters from b_best
This commit is contained in:
@@ -9,8 +9,6 @@ void manageArguments(argparse::ArgumentParser& program, int argc, char** argv)
|
|||||||
{
|
{
|
||||||
program.add_argument("-m", "--model").default_value("").help("Filter results of the selected model) (any for all models)");
|
program.add_argument("-m", "--model").default_value("").help("Filter results of the selected model) (any for all models)");
|
||||||
program.add_argument("-s", "--score").default_value("").help("Filter results of the score name supplied");
|
program.add_argument("-s", "--score").default_value("").help("Filter results of the score name supplied");
|
||||||
program.add_argument("--build").help("build best score results file").default_value(false).implicit_value(true);
|
|
||||||
program.add_argument("--report").help("report of best score results file").default_value(false).implicit_value(true);
|
|
||||||
program.add_argument("--friedman").help("Friedman test").default_value(false).implicit_value(true);
|
program.add_argument("--friedman").help("Friedman test").default_value(false).implicit_value(true);
|
||||||
program.add_argument("--excel").help("Output to excel").default_value(false).implicit_value(true);
|
program.add_argument("--excel").help("Output to excel").default_value(false).implicit_value(true);
|
||||||
program.add_argument("--level").help("significance level").default_value(0.05).scan<'g', double>().action([](const std::string& value) {
|
program.add_argument("--level").help("significance level").default_value(0.05).scan<'g', double>().action([](const std::string& value) {
|
||||||
@@ -40,8 +38,6 @@ int main(int argc, char** argv)
|
|||||||
program.parse_args(argc, argv);
|
program.parse_args(argc, argv);
|
||||||
model = program.get<std::string>("model");
|
model = program.get<std::string>("model");
|
||||||
score = program.get<std::string>("score");
|
score = program.get<std::string>("score");
|
||||||
build = program.get<bool>("build");
|
|
||||||
report = program.get<bool>("report");
|
|
||||||
friedman = program.get<bool>("friedman");
|
friedman = program.get<bool>("friedman");
|
||||||
excel = program.get<bool>("excel");
|
excel = program.get<bool>("excel");
|
||||||
level = program.get<double>("level");
|
level = program.get<double>("level");
|
||||||
@@ -53,11 +49,6 @@ int main(int argc, char** argv)
|
|||||||
std::cerr << program;
|
std::cerr << program;
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if (!report && !build) {
|
|
||||||
std::cerr << "Either build, report or both, have to be selected to do anything!" << std::endl;
|
|
||||||
std::cerr << program;
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (const std::exception& err) {
|
catch (const std::exception& err) {
|
||||||
std::cerr << err.what() << std::endl;
|
std::cerr << err.what() << std::endl;
|
||||||
@@ -66,20 +57,13 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
// Generate report
|
// Generate report
|
||||||
auto results = platform::BestResults(platform::Paths::results(), score, model, friedman, level);
|
auto results = platform::BestResults(platform::Paths::results(), score, model, friedman, level);
|
||||||
if (build) {
|
if (model == "any") {
|
||||||
if (model == "any") {
|
results.buildAll();
|
||||||
results.buildAll();
|
results.reportAll(excel);
|
||||||
} else {
|
} else {
|
||||||
std::string fileName = results.build();
|
std::string fileName = results.build();
|
||||||
std::cout << Colors::GREEN() << fileName << " created!" << Colors::RESET() << std::endl;
|
std::cout << Colors::GREEN() << fileName << " created!" << Colors::RESET() << std::endl;
|
||||||
}
|
results.reportSingle(excel);
|
||||||
}
|
|
||||||
if (report) {
|
|
||||||
if (model == "any") {
|
|
||||||
results.reportAll(excel);
|
|
||||||
} else {
|
|
||||||
results.reportSingle(excel);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -90,6 +90,7 @@ namespace platform {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
std::sort(files.begin(), files.end());
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
json BestResults::loadFile(const std::string& fileName)
|
json BestResults::loadFile(const std::string& fileName)
|
||||||
|
Reference in New Issue
Block a user