started smoothing part

This commit is contained in:
toni
2016-04-26 16:55:12 +02:00
parent 0e7c45eb02
commit bea3658b78
7 changed files with 120 additions and 5 deletions

View File

@@ -17,9 +17,11 @@ namespace MiscSettings {
const int timeSteps = 500;
const int numParticles = 7500;
const int numParticles = 500;
const int lag = 5;
const int numBSParticles = 50;
const int lag = 15;
const int fixedLagGap = 1;

View File

@@ -486,6 +486,17 @@ public:
oSError << runName << "\n\t"; statsSmoothing.appendTo(oSError); oSError << "\n\n";
oSError.close();
// append error for each run to a file
std::ofstream oTDError("/tmp/errorsDistFiltering.txt", std::ios_base::app);
oTDError << runName << "\n\t"; statsDistFiltering.appendTo(oTDError); oTDError << "\n\n";
oTDError.close();
// append error for each run to a file
std::ofstream oSDError("/tmp/errorsDistSmoothing.txt", std::ios_base::app);
oSDError << runName << "\n\t"; statsDistSmoothing.appendTo(oSDError); oSDError << "\n\n";
oSDError.close();
// plot-data
std::ofstream oPath("/tmp/path_" + runName + ".dat"); vis.groundTruth.addDataTo(oPath); oPath.close(); // ground truth
std::ofstream oEstN("/tmp/est_norm_" + runName + ".dat"); vis.estPath.addDataTo(oEstN); oEstN.close(); // estimation via filter itself

View File

@@ -51,7 +51,7 @@ public:
//create the backward smoothing filter
bf = new K::BackwardSimulation<MyState>(500);
bf = new K::BackwardSimulation<MyState>(MiscSettings::numBSParticles);
//bf = new K::CondensationBackwardFilter<MyState>;
bf->setSampler( std::unique_ptr<K::CumulativeSampler<MyState>>(new K::CumulativeSampler<MyState>()));

View File

@@ -57,7 +57,7 @@ void testModelWalk() {
std::vector<GridWalkState<MyGridNode>> states;
for (int i = 0; i < 1000; ++i) { states.push_back(GridWalkState<MyGridNode>(&start, Heading::rnd())); }
// for (int i = 0; i < 1000; ++i) { states.push_back(GridWalkState<MyGridNode>(&start, Heading::rnd())); }
// track the number-of-visits for each node to draw something like a particle-heat-map?