29 references to Sqrt
Microsoft.ML.Core.Tests (2)
UnitTests\TestVBuffer.cs (2)
99float l2 = MathUtils.Sqrt(l2Squared); 832var l2Dist = MathUtils.Sqrt(l2Dist2);
Microsoft.ML.Data (4)
Deprecated\Vector\VBufferMathUtils.cs (1)
41return MathUtils.Sqrt(NormSquared(in a));
Deprecated\Vector\VectorUtils.cs (2)
385return MathUtils.Sqrt(L2DistSquared(in a, in b)); 512return MathUtils.Sqrt(CpuMathUtils.SumSq(a));
Evaluators\MultiOutputRegressionEvaluator.cs (1)
536dst = MathUtils.Sqrt(VectorUtils.L2DistSquared(in label, in score));
Microsoft.ML.KMeansClustering (7)
KMeansPlusPlusTrainer.cs (7)
642MathUtils.Sqrt(newClusterL2 - 2 * VectorUtils.DotProduct(in newClusterFeatures, in oldClusterFeatures) + oldClusterL2); 710float pointDistance = MathUtils.Sqrt(pointDistanceSquared); 1218float clusterDelta = MathUtils.Sqrt(VectorUtils.L2DistSquared(in Centroids[i], in centroids[i])); 1306_upperBound[n] = MathUtils.Sqrt(instanceNormSquared + minDistance); 1307_lowerBound[n] = MathUtils.Sqrt(instanceNormSquared + secMinDistance); 1337float bestDistance = MathUtils.Sqrt(VectorUtils.L2DistSquared(in features, in centroids[_bestCluster[n]])); 1343float distance = MathUtils.Sqrt(VectorUtils.L2DistSquared(in features, in centroids[j]));
Microsoft.ML.Mkl.Components (1)
VectorWhitening.cs (1)
416eigValues[i] = MathUtils.Sqrt(Math.Max(0, eigValues[i]) + ex.Epsilon);
Microsoft.ML.PCA (1)
PcaTrainer.cs (1)
651return MathUtils.Sqrt((norm2X - norm2U) / norm2X); // normalized error
Microsoft.ML.StandardTrainers (6)
FactorizationMachine\FieldAwareFactorizationMachineUtils.cs (1)
47featureNorm = MathUtils.Sqrt(featureNorm);
Optimizer\LineSearch.cs (2)
102float t2 = Math.Sign(b.Step - a.Step) * MathUtils.Sqrt(t1 * t1 - a.Deriv * b.Deriv); 224private static readonly float _phi = (1 + MathUtils.Sqrt(5)) / 2;
Optimizer\SgdOptimizer.cs (1)
192stepSize = 1 / (_t0 + MathUtils.Sqrt(n));
Standard\Online\AveragedLinear.cs (1)
247rate /= MathUtils.Sqrt((float)NumWeightUpdates + NumNoUpdates + 1);
Standard\Online\LinearSvm.cs (1)
243float normalizer = 1 / (MathUtils.Sqrt(_lambda) * VectorUtils.Norm(Weights) * Math.Abs(WeightsScale));
Microsoft.ML.TimeSeries (2)
SrCnnAnomalyDetectionBase.cs (2)
187magList.Add(MathUtils.Sqrt((fftRe[i] * fftRe[i] + fftIm[i] * fftIm[i]))); 224ifftMagList.Add(MathUtils.Sqrt((ifftRe[i] * ifftRe[i] + ifftIm[i] * ifftIm[i])));
Microsoft.ML.Transforms (6)
FourierDistributionSampler.cs (1)
186return (float)Stats.SampleFromGaussian(rand) * MathUtils.Sqrt(2 * _gamma);
GcnTransform.cs (3)
542return MathUtils.Sqrt(sumSq / length); 562return MathUtils.Sqrt(sumSq / length); 573return MathUtils.Sqrt(CpuMathUtils.SumSq(mean, values));
RandomFourierFeaturizing.cs (2)
558scale = MathUtils.Sqrt(2.0f / transformInfo.NewDim); 563scale = MathUtils.Sqrt(1.0f / transformInfo.NewDim);