37 references to CompareNumbersWithTolerance
Microsoft.ML.Core.Tests (9)
UnitTests\TestEntryPoints.cs (1)
1745Assert.True(Single.IsNaN(scoreSaved) && Single.IsNaN(score) || CompareNumbersWithTolerance(scoreSaved, score, null, 5));
UnitTests\TestVBuffer.cs (8)
103Assert.True(CompareNumbersWithTolerance(sum, VectorUtils.Sum(in a), digitsOfPrecision: tol)); 104Assert.True(CompareNumbersWithTolerance(l1, VectorUtils.L1Norm(in a), digitsOfPrecision: tol)); 105Assert.True(CompareNumbersWithTolerance(l2Squared, VectorUtils.NormSquared(in a), digitsOfPrecision: tol)); 106Assert.True(CompareNumbersWithTolerance(l2, VectorUtils.Norm(in a), digitsOfPrecision: tol)); 107Assert.True(CompareNumbersWithTolerance(infNorm, VectorUtils.MaxNorm(in a), digitsOfPrecision: tol)); 836Assert.True(CompareNumbersWithTolerance(l1Dist, VectorUtils.L1Distance(in a, in b), digitsOfPrecision: tol)); 838Assert.True(CompareNumbersWithTolerance(l2Dist, VectorUtils.Distance(in a, in b), digitsOfPrecision: tol)); 839Assert.True(CompareNumbersWithTolerance(dot, VectorUtils.DotProduct(in a, in b), digitsOfPrecision: tol));
Microsoft.ML.TestFramework (3)
BaseTestBaseline.cs (3)
602if (!CompareNumbersWithTolerance(f1, f2, i, digitsOfPrecision)) 615if (!CompareNumbersWithTolerance(f1, f2, i, digitsOfPrecision)) 807CompareNumbersWithTolerance(Convert.ToSingle(expected), Convert.ToSingle(actual), null, precision);
Microsoft.ML.Tests (15)
TrainerEstimators\LbfgsTests.cs (6)
104CompareNumbersWithTolerance(biasStats.StandardError, 0.24, digitsOfPrecision: 2); 105CompareNumbersWithTolerance(biasStats.ZScore, 8.32, digitsOfPrecision: 2); 152CompareNumbersWithTolerance(stats.Deviance, 458.970917); 153CompareNumbersWithTolerance(stats.NullDeviance, 539.276367); 205CompareNumbersWithTolerance(stats.Deviance, 45.35, digitsOfPrecision: 0); 206CompareNumbersWithTolerance(stats.NullDeviance, 329.58, digitsOfPrecision: 2);
TrainerEstimators\MatrixFactorizationTests.cs (7)
497CompareNumbersWithTolerance(0.982391, testResults[0].Score, digitsOfPrecision: precision); 499CompareNumbersWithTolerance(0.141411, testResults[1].Score, digitsOfPrecision: precision); 565CompareNumbersWithTolerance(0.982391, testResults[0].Score, digitsOfPrecision: 5); 567CompareNumbersWithTolerance(0.141411, testResults[1].Score, digitsOfPrecision: 5); 635CompareNumbersWithTolerance(0.9823623, testResults[0].Score, digitsOfPrecision: 5); 638CompareNumbersWithTolerance(0.05511549, testResults[1].Score, digitsOfPrecision: 5); 639CompareNumbersWithTolerance(0.00316973357, testResults[2].Score, digitsOfPrecision: 5);
TrainerEstimators\SdcaTests.cs (2)
145if (!CompareNumbersWithTolerance(scores1[i], scores2[i], logFailure: false)) 204if (!CompareNumbersWithTolerance(scores1[i][0], scores2[i][0], logFailure: false))
Microsoft.ML.TimeSeries.Tests (10)
TimeSeriesSimpleApiTests.cs (10)
113CompareNumbersWithTolerance(expectedValues[index++], row.Data[0], digitsOfPrecision: 5); // Alert 114CompareNumbersWithTolerance(expectedValues[index++], row.Data[1], digitsOfPrecision: 5); // Raw score 115CompareNumbersWithTolerance(expectedValues[index++], row.Data[2], digitsOfPrecision: 5); // P-Value score 116CompareNumbersWithTolerance(expectedValues[index++], row.Data[3], digitsOfPrecision: 5); // Martingale score 164CompareNumbersWithTolerance(expectedValues[i][0], row.Data[0], digitsOfPrecision: 7); 165CompareNumbersWithTolerance(expectedValues[i][1], row.Data[1], digitsOfPrecision: 7); 166CompareNumbersWithTolerance(expectedValues[i][2], row.Data[2], digitsOfPrecision: 7); 222CompareNumbersWithTolerance(expectedValues[i][0], row.Data[0], digitsOfPrecision: 6); 223CompareNumbersWithTolerance(expectedValues[i][1], row.Data[1], digitsOfPrecision: 6); 224CompareNumbersWithTolerance(expectedValues[i][2], row.Data[2], digitsOfPrecision: 6);