Commit 9240e990 authored by jonas's avatar jonas
Browse files

gotta keep track of base rates...

parent 1484ac9d
......@@ -19,6 +19,7 @@ int main(int argc, char** argv){
size_t win_counter = 0;
size_t win_counter_more_than_1_sec = 0;
size_t counter = 0;
size_t counter_more_than_1_sec = 0;
for(Data data : data_vector){
auto modela_search = data.derived_performance.find(modela);
......@@ -31,13 +32,16 @@ int main(int argc, char** argv){
assert(modelb_perf_vec.size() == 1);
assert(modela_perf_vec[0].values_complete() && modelb_perf_vec[0].values_complete());
if(modela_perf_vec[0].time_in_sec.second < modelb_perf_vec[0].time_in_sec.second){
if(modelb_perf_vec[0].time_in_sec.second > 1){
++win_counter_more_than_1_sec;
}
++win_counter;
}
++counter;
if(modelb_perf_vec[0].time_in_sec.second > 1 || modela_perf_vec[0].time_in_sec.second > 1){
if(modela_perf_vec[0].time_in_sec.second < modelb_perf_vec[0].time_in_sec.second){
++win_counter_more_than_1_sec;
}
++counter_more_than_1_sec;
}
}
std::cout << modela << " wins " << (double)win_counter/counter*100 << "% of the times and " << (double)win_counter_more_than_1_sec/counter*100 << "% of the times when discarding instances of less than 1 sec run time in " << modelb << std::endl;
std::cout << modela << " wins " << (double)win_counter/counter*100 << "% of the times and " << (double)win_counter_more_than_1_sec/counter_more_than_1_sec*100 << "% of the times when discarding instances of less than 1 sec run time in both of the models which are " << (double)counter_more_than_1_sec/counter*100 << "% of instances" << std::endl;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment