diff --git a/code/eval/FixedLagEvalBase.h b/code/eval/FixedLagEvalBase.h index bac88ea..675bf7d 100644 --- a/code/eval/FixedLagEvalBase.h +++ b/code/eval/FixedLagEvalBase.h @@ -203,6 +203,8 @@ public: // error per update-step std::vector errorsNorm; std::vector errorsSmooth; + std::vector errorsDistNorm; + std::vector errorsDistSmooth; // number of updates to skip before starting the smoothing process const int skip = 35; @@ -327,6 +329,7 @@ public: statsFiltering.add(err); statsDistFiltering.add(errDist); errorsNorm.push_back(err); + errorsDistNorm.push_back(errDist); std::cout << "FilteringTime: " << se.ts << " " << statsFiltering.asString() << std::endl; std::cout << "FilteringDist: " << se.ts << " " << statsDistFiltering.asString() << std::endl; } @@ -372,6 +375,7 @@ public: statsSmoothing.add(errSmoothed); statsDistSmoothing.add(errDistSmoothed); errorsSmooth.push_back(errSmoothed); + errorsDistSmooth.push_back(errDistSmoothed); std::cout << "SmoothingTime: " << tsHistory[(tsHistory.size() - 1) - MiscSettings::lag] << " " << statsSmoothing.asString() << std::endl; std::cout << "SmoothingDist: " << tsHistory[(tsHistory.size() - 1) - MiscSettings::lag] << " " << statsDistSmoothing.asString() << std::endl; @@ -439,6 +443,18 @@ public: oError.close(); } + { // detailled distance-error-description (normally filtered) + std::ofstream oError("/tmp/err_dist_norm_" + runName + ".dat"); + for (float f : errorsDistNorm) {oError << f << "\n";} + oError.close(); + } + + { // detailled distance-error-description (smothed) + std::ofstream oError("/tmp/err_dist_smooth_" + runName + ".dat"); + for (float f : errorsDistSmooth) {oError << f << "\n";} + oError.close(); + } + // plot //vis.clearStates(); vis.gp.setTerminal("png", K::GnuplotSize(1280 * 2.54, 720 * 2.54) ); @@ -528,11 +544,21 @@ public: oPlot.close(); - std::ofstream oErrPlot("/tmp/plot_err_" + runName + ".gp"); - oErrPlot << "plot \\\n"; - oErrPlot << "'err_norm_" << runName << ".dat' with lines, \\\n"; - oErrPlot << "'err_smooth_" << runName << ".dat' with lines"; - oErrPlot.close(); + { + std::ofstream oErrPlot("/tmp/plot_err_" + runName + ".gp"); + oErrPlot << "plot \\\n"; + oErrPlot << "'err_norm_" << runName << ".dat' with lines, \\\n"; + oErrPlot << "'err_smooth_" << runName << ".dat' with lines"; + oErrPlot.close(); + } + + { + std::ofstream oErrPlot("/tmp/plot_dist_err_" + runName + ".gp"); + oErrPlot << "plot \\\n"; + oErrPlot << "'err_dist_norm_" << runName << ".dat' with lines, \\\n"; + oErrPlot << "'err_dist_smooth_" << runName << ".dat' with lines"; + oErrPlot.close(); + }