Add Wilcoxon Test

This commit is contained in:
2025-05-21 11:51:04 +02:00
parent 70d8022926
commit a56ec98ef9
14 changed files with 369 additions and 190 deletions

View File

@@ -30,7 +30,7 @@ namespace platform {
}
return columnName;
}
BestResultsExcel::BestResultsExcel(const std::string& score, const std::vector<std::string>& datasets) : score(score), datasets(datasets)
BestResultsExcel::BestResultsExcel(const std::string& path, const std::string& score, const std::vector<std::string>& datasets) : path(path), score(score), datasets(datasets)
{
file_name = Paths::bestResultsExcel(score);
workbook = workbook_new(getFileName().c_str());
@@ -92,7 +92,7 @@ namespace platform {
catch (const std::out_of_range& oor) {
auto tabName = "table_" + std::to_string(i);
auto worksheetNew = workbook_add_worksheet(workbook, tabName.c_str());
json data = loadResultData(Paths::results() + fileName);
json data = loadResultData(path + fileName);
auto report = ReportExcel(data, false, workbook, worksheetNew);
report.show();
hyperlink = "#table_" + std::to_string(i);
@@ -241,10 +241,10 @@ namespace platform {
}
worksheet_merge_range(worksheet, 0, 0, 0, 7, "Friedman Test", styles["headerFirst"]);
row = 2;
Statistics stats(models, datasets, table, significance, false);
Statistics stats(score, models, datasets, table, significance, false); // No output
auto result = stats.friedmanTest();
stats.postHocHolmTest();
// stats.postHocTestReport("Holm", result, false);
stats.postHocTest();
stats.postHocTestReport(result, false); // No tex output
auto friedmanResult = stats.getFriedmanResult();
auto postHocResult = stats.getPostHocResult();
worksheet_merge_range(worksheet, row, 0, row, 7, "Null hypothesis: H0 'There is no significant differences between all the classifiers.'", styles["headerSmall"]);