Fix excel constructor
This commit is contained in:
24
.vscode/launch.json
vendored
24
.vscode/launch.json
vendored
@@ -2,9 +2,9 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "sample",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "sample",
|
||||
"program": "${workspaceFolder}/build_debug/sample/BayesNetSample",
|
||||
"args": [
|
||||
"-d",
|
||||
@@ -14,14 +14,14 @@
|
||||
"-s",
|
||||
"271",
|
||||
"-p",
|
||||
"/Users/rmontanana/Code/discretizbench/datasets/",
|
||||
"${workspaceFolder}/../discretizbench/datasets/",
|
||||
],
|
||||
//"cwd": "${workspaceFolder}/build/sample/",
|
||||
},
|
||||
{
|
||||
"name": "experimentPy",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "experimentPy",
|
||||
"program": "${workspaceFolder}/build_debug/src/b_main",
|
||||
"args": [
|
||||
"-m",
|
||||
@@ -36,9 +36,9 @@
|
||||
"cwd": "${workspaceFolder}/../discretizbench",
|
||||
},
|
||||
{
|
||||
"name": "gridsearch",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "gridsearch",
|
||||
"program": "${workspaceFolder}/build_debug/src/b_grid",
|
||||
"args": [
|
||||
"-m",
|
||||
@@ -52,9 +52,9 @@
|
||||
"cwd": "${workspaceFolder}/../discretizbench",
|
||||
},
|
||||
{
|
||||
"name": "experimentBayes",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "experimentBayes",
|
||||
"program": "${workspaceFolder}/build_debug/src/b_main",
|
||||
"args": [
|
||||
"-m",
|
||||
@@ -69,23 +69,23 @@
|
||||
"cwd": "/home/rmontanana/Code/discretizbench",
|
||||
},
|
||||
{
|
||||
"name": "best",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "best",
|
||||
"program": "${workspaceFolder}/build_debug/src/b_best",
|
||||
"args": [
|
||||
"-m",
|
||||
"BoostAODE",
|
||||
"-s",
|
||||
"accuracy",
|
||||
"--build",
|
||||
"--excel"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/../discretizbench",
|
||||
},
|
||||
{
|
||||
"name": "manage",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "manage",
|
||||
"program": "${workspaceFolder}/build_debug/src/b_manage",
|
||||
"args": [
|
||||
"-n",
|
||||
@@ -94,18 +94,20 @@
|
||||
"cwd": "${workspaceFolder}/../discretizbench",
|
||||
},
|
||||
{
|
||||
"name": "list",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "list",
|
||||
"program": "${workspaceFolder}/build_debug/src/b_list",
|
||||
"args": [],
|
||||
"args": [
|
||||
"--excel"
|
||||
],
|
||||
//"cwd": "/Users/rmontanana/Code/discretizbench",
|
||||
"cwd": "${workspaceFolder}/../discretizbench",
|
||||
},
|
||||
{
|
||||
"name": "test",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "test",
|
||||
"program": "${workspaceFolder}/build_debug/tests/unit_tests",
|
||||
"args": [
|
||||
"-c=\"Metrics Test\"",
|
||||
|
16
Makefile
16
Makefile
@@ -96,22 +96,6 @@ test: ## Run tests (opt="-s") to verbose output the tests, (opt="-c='Test Maximu
|
||||
done
|
||||
@echo ">>> Done";
|
||||
|
||||
opt = ""
|
||||
testp: ## Run platform tests (opt="-s") to verbose output the tests, (opt="-c='Stratified Fold Test'") to run only that section
|
||||
@echo ">>> Running Platform tests...";
|
||||
@$(MAKE) clean
|
||||
@cmake --build $(f_debug) --target unit_tests_platform $(n_procs)
|
||||
@if [ -f $(f_debug)/tests/unit_tests_platform ]; then cd $(f_debug)/tests ; ./unit_tests_platform $(opt) ; fi ;
|
||||
@echo ">>> Done";
|
||||
|
||||
opt = ""
|
||||
testb: ## Run Platform tests (opt="-s") to verbose output the tests, (opt="-c='Test Maximum Spanning Tree'") to run only that section
|
||||
@echo ">>> Running Platform tests...";
|
||||
@$(MAKE) clean
|
||||
@cmake --build $(f_debug) --target unit_tests_bayesnet $(n_procs)
|
||||
@if [ -f $(f_debug)/tests/unit_tests_bayesnet ]; then cd $(f_debug)/tests ; ./unit_tests_bayesnet $(opt) ; fi ;
|
||||
@echo ">>> Done";
|
||||
|
||||
coverage: ## Run tests and generate coverage report (build/index.html)
|
||||
@echo ">>> Building tests with coverage..."
|
||||
@$(MAKE) test
|
||||
|
@@ -26,7 +26,7 @@ include_directories(
|
||||
set(best_sources b_best.cc BestResults.cc Statistics.cc BestResultsExcel.cc)
|
||||
list(TRANSFORM best_sources PREPEND best/)
|
||||
add_executable(b_best ${best_sources} main/Result.cc reports/ReportExcel.cc reports/ReportBase.cc reports/ExcelFile.cc common/Datasets.cc common/Dataset.cc)
|
||||
target_link_libraries(b_best Boost::boost "${XLSXWRITER_LIB}" "${TORCH_LIBRARIES}" ArffFiles mdlp)
|
||||
target_link_libraries(b_best Boost::boost "${TORCH_LIBRARIES}" "${XLSXWRITER_LIB}" ArffFiles mdlp)
|
||||
|
||||
# b_grid
|
||||
set(grid_sources b_grid.cc GridSearch.cc GridData.cc)
|
||||
@@ -38,13 +38,13 @@ target_link_libraries(b_grid PyClassifiers ${MPI_CXX_LIBRARIES} ArffFiles)
|
||||
set(list_sources b_list.cc DatasetsExcel.cc)
|
||||
list(TRANSFORM list_sources PREPEND list/)
|
||||
add_executable(b_list ${list_sources} common/Datasets.cc common/Dataset.cc reports/ReportExcel.cc reports/ExcelFile.cc reports/ReportBase.cc)
|
||||
target_link_libraries(b_list ArffFiles mdlp "${TORCH_LIBRARIES}" "${XLSXWRITER_LIB}")
|
||||
target_link_libraries(b_list "${TORCH_LIBRARIES}" "${XLSXWRITER_LIB}" ArffFiles mdlp)
|
||||
|
||||
# b_main
|
||||
set(main_sources b_main.cc Experiment.cc Models.cc HyperParameters.cc)
|
||||
list(TRANSFORM main_sources PREPEND main/)
|
||||
add_executable(b_main ${main_sources} common/Datasets.cc common/Dataset.cc reports/ReportConsole.cc reports/ReportBase.cc main/Result.cc)
|
||||
target_link_libraries(b_main PyClassifiers BayesNet ArffFiles mdlp "${TORCH_LIBRARIES}")
|
||||
target_link_libraries(b_main PyClassifiers BayesNet ArffFiles mdlp)
|
||||
|
||||
# b_manage
|
||||
set(manage_sources b_manage.cc ManageResults.cc CommandParser.cc Results.cc)
|
||||
|
@@ -37,6 +37,7 @@ namespace platform {
|
||||
setProperties("Best Results");
|
||||
int maxDatasetName = (*max_element(datasets.begin(), datasets.end(), [](const std::string& a, const std::string& b) { return a.size() < b.size(); })).size();
|
||||
datasetNameSize = std::max(datasetNameSize, maxDatasetName);
|
||||
createFormats();
|
||||
}
|
||||
void BestResultsExcel::reportAll(const std::vector<std::string>& models, const json& table, const std::map<std::string, std::map<std::string, float>>& ranks, bool friedman, double significance)
|
||||
{
|
||||
|
@@ -8,6 +8,7 @@ namespace platform {
|
||||
{
|
||||
file_name = "datasets.xlsx";
|
||||
workbook = workbook_new(getFileName().c_str());
|
||||
createFormats();
|
||||
setProperties("Datasets");
|
||||
}
|
||||
DatasetsExcel::~DatasetsExcel()
|
||||
|
@@ -1,20 +1,18 @@
|
||||
#include "ExcelFile.h"
|
||||
#include "Paths.h"
|
||||
|
||||
namespace platform {
|
||||
ExcelFile::ExcelFile()
|
||||
{
|
||||
setDefault();
|
||||
createFormats();
|
||||
}
|
||||
ExcelFile::ExcelFile(lxw_workbook* workbook) : workbook(workbook)
|
||||
{
|
||||
setDefault();
|
||||
createFormats();
|
||||
}
|
||||
ExcelFile::ExcelFile(lxw_workbook* workbook, lxw_worksheet* worksheet) : workbook(workbook), worksheet(worksheet)
|
||||
{
|
||||
setDefault();
|
||||
createFormats();
|
||||
}
|
||||
void ExcelFile::setDefault()
|
||||
{
|
||||
|
@@ -3,7 +3,6 @@
|
||||
#include <locale>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include "Paths.h"
|
||||
#include "xlsxwriter.h"
|
||||
|
||||
namespace platform {
|
||||
|
@@ -9,6 +9,7 @@ namespace platform {
|
||||
ReportExcel::ReportExcel(json data_, bool compare, lxw_workbook* workbook, lxw_worksheet* worksheet) : ReportBase(data_, compare), ExcelFile(workbook, worksheet)
|
||||
{
|
||||
createFile();
|
||||
createFormats();
|
||||
}
|
||||
|
||||
void ReportExcel::formatColumns()
|
||||
|
Reference in New Issue
Block a user