Fix pm code in tex bestresults
This commit is contained in:
@@ -27,7 +27,7 @@ namespace platform {
|
|||||||
handler << "\\tiny " << std::endl;
|
handler << "\\tiny " << std::endl;
|
||||||
handler << "\\renewcommand{\\arraystretch }{1.2} " << std::endl;
|
handler << "\\renewcommand{\\arraystretch }{1.2} " << std::endl;
|
||||||
handler << "\\renewcommand{\\tabcolsep }{0.07cm} " << std::endl;
|
handler << "\\renewcommand{\\tabcolsep }{0.07cm} " << std::endl;
|
||||||
handler << "\\caption{Accuracy results(mean $\pm$ std) for all the algorithms and datasets} " << std::endl;
|
handler << "\\caption{Accuracy results(mean $\\pm$ std) for all the algorithms and datasets} " << std::endl;
|
||||||
handler << "\\label{tab:results_accuracy}" << std::endl;
|
handler << "\\label{tab:results_accuracy}" << std::endl;
|
||||||
handler << "\\begin{tabular} {{r" << std::string(models.size(), 'c').c_str() << "}}" << std::endl;
|
handler << "\\begin{tabular} {{r" << std::string(models.size(), 'c').c_str() << "}}" << std::endl;
|
||||||
handler << "\\hline " << std::endl;
|
handler << "\\hline " << std::endl;
|
||||||
@@ -62,7 +62,7 @@ namespace platform {
|
|||||||
double value = table[model].at(dataset).at(0).get<double>();
|
double value = table[model].at(dataset).at(0).get<double>();
|
||||||
double std_value = table[model].at(dataset).at(3).get<double>();
|
double std_value = table[model].at(dataset).at(3).get<double>();
|
||||||
const char* bold = value == max_value ? "\\bfseries" : "";
|
const char* bold = value == max_value ? "\\bfseries" : "";
|
||||||
handler << "& " << bold << std::setprecision(4) << std::fixed << value << "$\pm$" << std::setprecision(3) << std_value;
|
handler << "& " << bold << std::setprecision(4) << std::fixed << value << "$\\pm$" << std::setprecision(3) << std_value;
|
||||||
}
|
}
|
||||||
handler << "\\\\" << std::endl;
|
handler << "\\\\" << std::endl;
|
||||||
}
|
}
|
||||||
@@ -76,7 +76,7 @@ namespace platform {
|
|||||||
double value = std::reduce(totals.at(model).begin(), totals.at(model).end()) / nDatasets;
|
double value = std::reduce(totals.at(model).begin(), totals.at(model).end()) / nDatasets;
|
||||||
double std_value = compute_std(totals.at(model), value);
|
double std_value = compute_std(totals.at(model), value);
|
||||||
const char* bold = model == best_model ? "\\bfseries" : "";
|
const char* bold = model == best_model ? "\\bfseries" : "";
|
||||||
handler << "& " << bold << std::setprecision(4) << std::fixed << value << "$\pm$" << std::setprecision(3) << std::fixed << std_value;
|
handler << "& " << bold << std::setprecision(4) << std::fixed << value << "$\\pm$" << std::setprecision(3) << std::fixed << std_value;
|
||||||
}
|
}
|
||||||
handler << "\\\\" << std::endl;
|
handler << "\\\\" << std::endl;
|
||||||
handler << "\\hline " << std::endl;
|
handler << "\\hline " << std::endl;
|
||||||
|
@@ -85,11 +85,11 @@ namespace platform {
|
|||||||
std::mt19937 g{ 271 }; // Use fixed seed to obtain the same shuffle
|
std::mt19937 g{ 271 }; // Use fixed seed to obtain the same shuffle
|
||||||
std::shuffle(tasks.begin(), tasks.end(), g);
|
std::shuffle(tasks.begin(), tasks.end(), g);
|
||||||
std::cout << get_color_rank(rank) << "* Number of tasks: " << tasks.size() << std::endl;
|
std::cout << get_color_rank(rank) << "* Number of tasks: " << tasks.size() << std::endl;
|
||||||
std::cout << "|";
|
std::cout << separator;
|
||||||
for (int i = 0; i < tasks.size(); ++i) {
|
for (int i = 0; i < tasks.size(); ++i) {
|
||||||
std::cout << (i + 1) % 10;
|
std::cout << (i + 1) % 10;
|
||||||
}
|
}
|
||||||
std::cout << "|" << std::endl << "|" << std::flush;
|
std::cout << separator << std::endl << separator << std::flush;
|
||||||
return tasks;
|
return tasks;
|
||||||
}
|
}
|
||||||
void process_task_mpi_consumer(struct ConfigGrid& config, struct ConfigMPI& config_mpi, json& tasks, int n_task, Datasets& datasets, Task_Result* result)
|
void process_task_mpi_consumer(struct ConfigGrid& config, struct ConfigMPI& config_mpi, json& tasks, int n_task, Datasets& datasets, Task_Result* result)
|
||||||
@@ -360,7 +360,7 @@ namespace platform {
|
|||||||
//
|
//
|
||||||
auto datasets_names = filterDatasets(datasets);
|
auto datasets_names = filterDatasets(datasets);
|
||||||
json all_results = producer(datasets_names, tasks, config_mpi, MPI_Result);
|
json all_results = producer(datasets_names, tasks, config_mpi, MPI_Result);
|
||||||
std::cout << get_color_rank(config_mpi.rank) << "|" << std::endl;
|
std::cout << get_color_rank(config_mpi.rank) << separator << std::endl;
|
||||||
//
|
//
|
||||||
// 3. Manager select the bests sccores for each dataset
|
// 3. Manager select the bests sccores for each dataset
|
||||||
//
|
//
|
||||||
|
@@ -55,6 +55,7 @@ namespace platform {
|
|||||||
struct ConfigGrid config;
|
struct ConfigGrid config;
|
||||||
json build_tasks_mpi(int rank);
|
json build_tasks_mpi(int rank);
|
||||||
Timer timer; // used to measure the time of the whole process
|
Timer timer; // used to measure the time of the whole process
|
||||||
|
const std::string separator = "|";
|
||||||
};
|
};
|
||||||
} /* namespace platform */
|
} /* namespace platform */
|
||||||
#endif
|
#endif
|
Reference in New Issue
Block a user