Skip to content

Commit a061835

Browse files
[ML][TEST] Fix event rate test with rule
Relates #171
1 parent 614b8c7 commit a061835

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/model/unittest/CEventRateModelTest.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,7 +2503,8 @@ void CEventRateModelTest::testComputeProbabilityGivenDetectionRule() {
25032503

25042504
SAnnotatedProbability annotatedProbability;
25052505
CPPUNIT_ASSERT(model->computeProbability(0 /*pid*/, now, now + bucketLength, partitioningFields,
2506-
1, annotatedProbability) == false);
2506+
1, annotatedProbability));
2507+
CPPUNIT_ASSERT_DOUBLES_EQUAL(annotatedProbability.s_Probability, 1.0, 0.00001);
25072508
}
25082509

25092510
void CEventRateModelTest::testDecayRateControl() {
@@ -2579,7 +2580,7 @@ void CEventRateModelTest::testDecayRateControl() {
25792580
<< maths::CBasicStatistics::mean(meanReferencePredictionError));
25802581
CPPUNIT_ASSERT_DOUBLES_EQUAL(
25812582
maths::CBasicStatistics::mean(meanReferencePredictionError),
2582-
maths::CBasicStatistics::mean(meanPredictionError), 0.05);
2583+
maths::CBasicStatistics::mean(meanPredictionError), 0.01);
25832584
}
25842585

25852586
LOG_DEBUG(<< "*** Test linear scaling ***");

0 commit comments

Comments
 (0)