Change Constant smooth type
This commit is contained in:
@@ -30,7 +30,7 @@ namespace platform {
|
||||
{"margin", {"0.1", "0.2", "0.3"}},
|
||||
{"n_folds", {"5", "10"}},
|
||||
{"discretize_algo", {"mdlp", "bin3u", "bin3q", "bin4u", "bin4q"}},
|
||||
{"smooth_strat", {"OLD_LAPLACE", "LAPLACE", "CESTNIK"}},
|
||||
{"smooth_strat", {"ORIGINAL", "LAPLACE", "CESTNIK"}},
|
||||
{"platform", {"any"}},
|
||||
{"model", {"any"}},
|
||||
{"seeds", {"any"}},
|
||||
@@ -48,7 +48,7 @@ namespace platform {
|
||||
file << "platform=um790Linux" << std::endl;
|
||||
file << "n_folds=5" << std::endl;
|
||||
file << "discretize_algo=mdlp" << std::endl;
|
||||
file << "smooth_strat=OLD_LAPLACE" << std::endl;
|
||||
file << "smooth_strat=ORIGINAL" << std::endl;
|
||||
file << "stratified=0" << std::endl;
|
||||
file << "model=TAN" << std::endl;
|
||||
file << "seeds=[271]" << std::endl;
|
||||
|
@@ -28,9 +28,8 @@ namespace platform {
|
||||
Experiment& setSmoothSrategy(const std::string& smooth_strategy)
|
||||
{
|
||||
this->smooth_strategy = smooth_strategy; this->result.setSmoothStrategy(smooth_strategy);
|
||||
std::cout << "Experiment: Smoothing strategy: [" << smooth_strategy << "]" << std::endl;
|
||||
if (smooth_strategy == "OLD_LAPLACE")
|
||||
smooth_type = bayesnet::Smoothing_t::OLD_LAPLACE;
|
||||
if (smooth_strategy == "ORIGINAL")
|
||||
smooth_type = bayesnet::Smoothing_t::ORIGINAL;
|
||||
else if (smooth_strategy == "LAPLACE")
|
||||
smooth_type = bayesnet::Smoothing_t::LAPLACE;
|
||||
else if (smooth_strategy == "CESTNIK")
|
||||
@@ -39,7 +38,6 @@ namespace platform {
|
||||
std::cerr << "Experiment: Unknown smoothing strategy: " << smooth_strategy << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
std::cout << "Experiment: " << (smooth_type == bayesnet::Smoothing_t::CESTNIK) << " " << static_cast<int>(smooth_type) << std::endl;
|
||||
return *this;
|
||||
}
|
||||
Experiment& setLanguageVersion(const std::string& language_version) { this->result.setLanguageVersion(language_version); return *this; }
|
||||
|
@@ -23,9 +23,9 @@ namespace platform {
|
||||
+ " random seeds. " + data["date"].get<std::string>() + " " + data["time"].get<std::string>()
|
||||
);
|
||||
sheader << headerLine(data["title"].get<std::string>());
|
||||
std::string discretiz_algo = data.find("discretization_algorithm") != data.end() ? data["discretization_algorithm"].get<std::string>() : "OLD_LAPLACE";
|
||||
std::string discretiz_algo = data.find("discretization_algorithm") != data.end() ? data["discretization_algorithm"].get<std::string>() : "ORIGINAL";
|
||||
std::string algorithm = data["discretized"].get<bool>() ? " (" + discretiz_algo + ")" : "";
|
||||
std::string smooth = data.find("smooth_strategy") != data.end() ? data["smooth_strategy"].get<std::string>() : "OLD_LAPLACE";
|
||||
std::string smooth = data.find("smooth_strategy") != data.end() ? data["smooth_strategy"].get<std::string>() : "ORIGINAL";
|
||||
sheader << headerLine(
|
||||
"Random seeds: " + fromVector("seeds") + " Discretized: " + (data["discretized"].get<bool>() ? "True" : "False") + algorithm
|
||||
+ " Stratified: " + (data["stratified"].get<bool>() ? "True" : "False") + " Smooth Strategy: " + smooth
|
||||
|
@@ -50,7 +50,7 @@ namespace platform {
|
||||
worksheet_merge_range(worksheet, 1, 0, 1, 12, data["title"].get<std::string>().c_str(), styles["headerRest"]);
|
||||
worksheet_merge_range(worksheet, 2, 0, 3, 0, ("Score is " + data["score_name"].get<std::string>()).c_str(), styles["headerRest"]);
|
||||
writeString(2, 1, "Smooth", "headerRest");
|
||||
std::string smooth = data.find("smooth_strategy") != data.end() ? data["smooth_strategy"].get<std::string>() : "OLD_LAPLACE";
|
||||
std::string smooth = data.find("smooth_strategy") != data.end() ? data["smooth_strategy"].get<std::string>() : "ORIGINAL";
|
||||
writeString(3, 1, smooth, "headerSmall");
|
||||
worksheet_merge_range(worksheet, 2, 2, 3, 3, "Execution time", styles["headerRest"]);
|
||||
oss << std::setprecision(2) << std::fixed << data["duration"].get<float>() << " s";
|
||||
|
Reference in New Issue
Block a user