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