Add discretization algo to reports

This commit is contained in:
2024-06-09 01:11:56 +02:00
parent 643633e6dd
commit 080f3cee34
3 changed files with 4 additions and 10 deletions

View File

@@ -194,14 +194,6 @@ namespace platform {
//
// Train model
//
std::cout << "X_Train.dtype: " << X_train.dtype() << "\n";
std::cout << "y_Train.dtype: " << y_train.dtype() << "\n";
std::cout << "X_Test.dtype: " << X_test.dtype() << "\n";
std::cout << "y_Test.dtype: " << y_test.dtype() << "\n";
for (int i = 0; i < features.size(); i++) {
std::cout << "Feature: " << features[i] << " states: " << states[features[i]].size() << "\n";
}
std::cout << "className: " << className << " states: " << states[className].size() << "\n";
clf->fit(X_train, y_train, features, className, states);
if (!quiet)
showProgress(nfold + 1, getColor(clf->getStatus()), "b");

View File

@@ -23,8 +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 algorithm = data["discretized"].get<bool>() ? " (" + data["discretization_algorithm"].get<std::string>() + ")" : "";
sheader << headerLine(
"Random seeds: " + fromVector("seeds") + " Discretized: " + (data["discretized"].get<bool>() ? "True" : "False")
"Random seeds: " + fromVector("seeds") + " Discretized: " + (data["discretized"].get<bool>() ? "True" : "False") + algorithm
+ " Stratified: " + (data["stratified"].get<bool>() ? "True" : "False")
);
oss << "Execution took " << std::setprecision(2) << std::fixed << data["duration"].get<float>()

View File

@@ -65,7 +65,8 @@ namespace platform {
worksheet_merge_range(worksheet, 3, 10, 3, 11, oss.str().c_str(), styles["headerSmall"]);
oss.str("");
oss.clear();
oss << "Discretized: " << (data["discretized"].get<bool>() ? "True" : "False");
std::string algorithm = data["discretized"].get<bool>() ? " (" + data["discretization_algorithm"].get<std::string>() + ")" : "";
oss << "Discretized: " << (data["discretized"].get<bool>() ? "True" : "False") << algorithm;
worksheet_write_string(worksheet, 3, 12, oss.str().c_str(), styles["headerSmall"]);
}
void ReportExcel::header_notes(int row)