Fix AFCalcResult unit test
-- I was simply passing in the wrong values into the function. Fixed the calls, and expanded the docs on what needs to be passed in.
This commit is contained in:
parent
6bf31065e3
commit
dd52a70d45
|
|
@ -111,11 +111,11 @@ public class AFCalcResultUnitTest extends BaseTest {
|
|||
|
||||
@Test(enabled = true, dataProvider = "TestIsPolymorphic")
|
||||
private void testIsPolymorphic(final double pNonRef, final double pThreshold, final boolean shouldBePoly) {
|
||||
final AFCalcResult result = makePolymorphicTestData(pNonRef);
|
||||
final boolean actualIsPoly = result.isPolymorphic(C, Math.log10(pThreshold));
|
||||
Assert.assertEquals(actualIsPoly, shouldBePoly,
|
||||
"isPolymorphic with pNonRef " + pNonRef + " and threshold " + pThreshold + " returned "
|
||||
+ actualIsPoly + " but the expected result is " + shouldBePoly);
|
||||
final AFCalcResult result = makePolymorphicTestData(pNonRef);
|
||||
final boolean actualIsPoly = result.isPolymorphic(C, Math.log10(1 - pThreshold));
|
||||
Assert.assertEquals(actualIsPoly, shouldBePoly,
|
||||
"isPolymorphic with pNonRef " + pNonRef + " and threshold " + pThreshold + " returned "
|
||||
+ actualIsPoly + " but the expected result is " + shouldBePoly);
|
||||
}
|
||||
|
||||
@Test(enabled = true, dataProvider = "TestIsPolymorphic")
|
||||
|
|
|
|||
|
|
@ -230,6 +230,9 @@ public class AFCalcResult {
|
|||
* And that log10minPNonRef is -3.
|
||||
* We are considered polymorphic since 10^-5 < 10^-3 => -5 < -3
|
||||
*
|
||||
* Note that log10minPNonRef is really the minimum confidence, scaled as an error rate, so
|
||||
* if you want to be 99% confidence, then log10PNonRef should be log10(0.01) = -2.
|
||||
*
|
||||
* @param log10minPNonRef the log10 scaled min pr of being non-ref to be considered polymorphic
|
||||
*
|
||||
* @return true if there's enough confidence (relative to log10minPNonRef) to reject AF == 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue