Skip to content

Commit

Permalink
Patching unit test on KSG MI with discrete which tested that result c…
Browse files Browse the repository at this point in the history
…hanged from K=2 to 4, but the threshold for change was too large.
  • Loading branch information
jlizier committed Jul 25, 2019
1 parent 0dae162 commit d545793
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,14 @@ public void testProperties() throws Exception {
miCalc.initialise(1, 2);
miCalc.setObservations(contData, discData);
double res3 = miCalc.computeAverageLocalOfObservations();
assertTrue(Math.abs(res3 - res1) > 0.001);
double diff = Math.abs(res3 - res1);
double tol = 1e-6;
if (diff <= tol) {
System.out.printf("KSG MI with discrete changed less (%.8f) than %.7f when K changed from 2 to 4." +
"That can happen at random, but we are failing the unit test as a warning; re-run to check.\n",
diff, tol);
}
assertTrue(diff > tol);
miCalc.setProperty("k", "4");

// Test that noiseLevel has an effect
Expand Down

0 comments on commit d545793

Please sign in to comment.