17 references to MathUtils
Microsoft.ML.Core (3)
Utilities\Stats.cs (3)
191
double logkFac =
MathUtils
.LogFactorial(k);
209
ret -= scale *
MathUtils
.Log(1 - 2 * u);
211
ret += scale *
MathUtils
.Log(1 + 2 * u);
Microsoft.ML.Core.Tests (3)
UnitTests\TestVBuffer.cs (3)
99
float l2 =
MathUtils
.Sqrt(l2Squared);
831
var l2Dist2 = a.Items(all: true).Zip(b.Items(all: true), (av, bv) =>
MathUtils
.Pow(av.Value - bv.Value, 2)).Sum();
832
var l2Dist =
MathUtils
.Sqrt(l2Dist2);
Microsoft.ML.Tests (11)
CalibratedModelParametersTests.cs (1)
146
rawScores[i] =
MathUtils
.Sigmoid(rawScores[i] - averageScore) > 0.5 ? 1 : 0;
FeatureContributionTests.cs (3)
336
rawScores[i] =
MathUtils
.Sigmoid(rawScores[i] - averageScore) > 0.5 ? 1 : 0;
341
var min =
MathUtils
.Min(rawScores);
342
var max =
MathUtils
.Max(rawScores);
PermutationFeatureImportanceTests.cs (3)
979
rawScores[i] =
MathUtils
.Sigmoid(rawScores[i] - averageScore) > 0.5 ? 1 : 0;
984
var min =
MathUtils
.Min(rawScores);
985
var max =
MathUtils
.Max(rawScores);
TrainerEstimators\TreeEstimators.cs (4)
569
sum +=
MathUtils
.SigmoidSlow(sigmoidScale * (float)nativeResult1[j + i * _classNumber]);
573
double prob =
MathUtils
.SigmoidSlow(sigmoidScale * (float)nativeResult1[j + i * _classNumber]);
605
sum +=
MathUtils
.SigmoidSlow((float)sigmoidScale * (float)nativeResult1[j + i * _classNumber]);
609
double prob =
MathUtils
.SigmoidSlow((float)sigmoidScale * (float)nativeResult1[j + i * _classNumber]);