added kullback leibler for gaussian cases

This commit is contained in:
toni
2017-03-09 18:57:47 +01:00
parent f7d0d88448
commit d5bc1111f5
9 changed files with 374 additions and 8 deletions

View File

@@ -58,7 +58,7 @@ public:
const Timestamp age = curTime - entry.getTimestamp();
Assert::isTrue(age.ms() >= 0, "found a negative wifi measurement age. this does not make sense");
Assert::isTrue(age.ms() <= 40000, "found a 40 second old wifi measurement. maybe there is a coding error?");
//Assert::isTrue(age.ms() <= 40000, "found a 40 second old wifi measurement. maybe there is a coding error?");
// sigma grows with measurement age
const float sigma = this->sigma + this->sigmaPerSecond * age.sec();
@@ -72,14 +72,15 @@ public:
}
// sanity check
Assert::isTrue(numMatchingAPs > 0, "not a single measured AP was matched against known ones. coding error? model error?");
//Assert::isTrue(numMatchingAPs > 0, "not a single measured AP was matched against known ones. coding error? model error?");
return prob;
}
template <typename Node> double getProbability(const Node& n, const Timestamp curTime, const WiFiMeasurements& obs, const int age_ms = 0) const {
throw Exception("todo??");
return this->getProbability(n.inMeter() + Point3(0,0,1.3), curTime, obs);
}
};