public McNemarTest(ConfusionMatrix matrix, bool yatesCorrection = false) { int a = matrix.TruePositives; int b = matrix.FalseNegatives; int c = matrix.FalsePositives; int d = matrix.TrueNegatives; double u = b - c; if (yatesCorrection) u = Math.Abs(u) - 0.5; double chiSquare = (u * u) / (b + c); int df = 1; Compute(chiSquare, df); }