10 references to Sum
Microsoft.ML.Core.Tests (2)
UnitTests\TestVBuffer.cs (2)
830var l1Dist = a.Items(all: true).Zip(b.Items(all: true), (av, bv) => Math.Abs(av.Value - bv.Value)).Sum(); 833var dot = a.Items(all: true).Zip(b.Items(all: true), (av, bv) => av.Value * bv.Value).Sum();
Microsoft.ML.OnnxTransformerTest (5)
OnnxTransformTests.cs (5)
455Assert.Equal(0, buffera.GetValues().ToArray().Sum()); 456Assert.Equal(30, bufferb.GetValues().ToArray().Sum()); 495Assert.Equal(0, buffera.GetValues().ToArray().Sum()); 496Assert.Equal(30, bufferb.GetValues().ToArray().Sum()); 516Assert.Equal(30, bufferb.GetValues().ToArray().Sum());
Microsoft.ML.Predictor.Tests (2)
TestPredictors.cs (2)
740Assert.Equal(score, 0.4 * scores.Sum() / predCount, 0.00001); 947CompareNumbersWithTolerance(score, scores.Sum() / predCount, digitsOfPrecision: 5);
Microsoft.ML.Transforms (1)
Dracula\CountTable.cs (1)
66var priorSum = priorCounts.Sum();