55 references to DotProduct
Microsoft.ML.Core.Tests (1)
UnitTests\TestVBuffer.cs (1)
839Assert.True(CompareNumbersWithTolerance(dot, VectorUtils.DotProduct(in a, in b), digitsOfPrecision: tol));
Microsoft.ML.KMeansClustering (6)
KMeansModelParameters.cs (1)
173-2 * VectorUtils.DotProduct(in _centroids[i], in src) + _centroidL2s[i] + instanceL2);
KMeansPlusPlusTrainer.cs (5)
399var distance = -2 * VectorUtils.DotProduct(in cursor.Features, in centroids[j]) 642MathUtils.Sqrt(newClusterL2 - 2 * VectorUtils.DotProduct(in newClusterFeatures, in oldClusterFeatures) + oldClusterL2); 720Contracts.Assert(-2 * VectorUtils.DotProduct(in point, in clusters[j]) + clustersL2s[j] > bestWeight); 724float weight = -2 * VectorUtils.DotProduct(in point, in clusters[j]) + clustersL2s[j]; 1804float distance = -2 * VectorUtils.DotProduct(in features, in centroids[j]) + centroidL2s[j];
Microsoft.ML.PCA (4)
PcaTrainer.cs (4)
463_meanProjected[i] = VectorUtils.DotProduct(in _eigenVectors[i], in mean); 512_meanProjected[i] = VectorUtils.DotProduct(in _eigenVectors[i], in _mean); 6382 * VectorUtils.DotProduct(in mean, in src) + _norm2Mean; 647float component = VectorUtils.DotProduct(in _eigenVectors[i], in src) - _meanProjected[i];
Microsoft.ML.StandardTrainers (44)
LdSvm\LdSvmModelParameters.cs (5)
254score += Math.Tanh(_sigma * (VectorUtils.DotProduct(in _thetaPrime[current], in src) + _biasThetaPrime[current])) * 255(VectorUtils.DotProduct(in _w[current], in src) + _biasW[current]); 256childIndicator = VectorUtils.DotProduct(in _theta[current], in src) + _biasTheta[current]; 259score += Math.Tanh(_sigma * (VectorUtils.DotProduct(in _thetaPrime[current], in src) + _biasThetaPrime[current])) * 260(VectorUtils.DotProduct(in _w[current], in src) + _biasW[current]);
LdSvm\LdSvmTrainer.cs (6)
212tanhThetaTx[i] = (float)Math.Tanh(gamma * (VectorUtils.DotProduct(in feat, in theta[i]) + biasTheta[i])); 216float tempGrad = pathWt[i] * localWt[i] * (VectorUtils.DotProduct(in feat, in w[i]) + biasW[i]); 241tempSum += Math.Abs(VectorUtils.DotProduct(in s, in theta[thetaIdx]) + biasTheta[thetaIdx]); 324var tanhDist = (float)Math.Tanh(gamma * (VectorUtils.DotProduct(in features, in theta[i]) + biasTheta[i])); 331localWt[l] = (float)Math.Tanh(_options.Sigma * (VectorUtils.DotProduct(in features, in thetaPrime[l]) + biasThetaPrime[l])); 337wDotX[l] = VectorUtils.DotProduct(in features, in w[l]) + biasW[l];
Optimizer\DifferentiableFunction.cs (4)
225float dirDeriv = VectorUtils.DotProduct(in grad, in dir); 272float dirDeriv = VectorUtils.DotProduct(in grad, in dir); 311float dirDeriv = VectorUtils.DotProduct(in grad, in dir); 336float dirDeriv = VectorUtils.DotProduct(in newGrad, in dir);
Optimizer\L1Optimizer.cs (7)
199float dirDeriv = -VectorUtils.DotProduct(in _dir, in _steepestDescDir); 211float unnormCos = VectorUtils.DotProduct(in _steepestDescDir, in _newX) - VectorUtils.DotProduct(in _steepestDescDir, in _x); 222unnormCos = VectorUtils.DotProduct(in _steepestDescDir, in _newX) - VectorUtils.DotProduct(in _steepestDescDir, in _x); 242unnormCos = VectorUtils.DotProduct(in _steepestDescDir, in _newX) - VectorUtils.DotProduct(in _steepestDescDir, in _x);
Optimizer\LineSearch.cs (3)
464float d1 = VectorUtils.DotProduct(in x, in _c1); 465float d2 = VectorUtils.DotProduct(in x, in _c2); 466float d3 = VectorUtils.DotProduct(in x, in _c3);
Optimizer\Optimizer.cs (7)
261alphas[i] = -VectorUtils.DotProduct(in _sList[i], in _dir) / _roList[i]; 272float yDotY = VectorUtils.DotProduct(in _yList[lastGoodRo], in _yList[lastGoodRo]); 279float beta = VectorUtils.DotProduct(in _yList[i], in _dir) / _roList[i]; 359float ro = VectorUtils.DotProduct(in nextS, in nextY); 383float dirDeriv = VectorUtils.DotProduct(in _dir, in _grad); 425dirDeriv = VectorUtils.DotProduct(in _dir, in _newGrad); 499dirDeriv = VectorUtils.DotProduct(in _dir, in _newGrad);
Optimizer\SgdOptimizer.cs (3)
314public float Deriv => VectorUtils.DotProduct(in _dir, in _grad); 333deriv = VectorUtils.DotProduct(in _dir, in _newGrad); 342float newByOld = VectorUtils.DotProduct(in _newGrad, in _grad);
Standard\LinearModelParameters.cs (2)
269return Bias + VectorUtils.DotProduct(in weights, in src); 272return Bias + VectorUtils.DotProduct(in _weightsDense, in src);
Standard\LogisticRegression\MulticlassLogisticRegression.cs (1)
791editor.Values[i] = Biases[i] + VectorUtils.DotProduct(in weights[i], in src);
Standard\Online\AveragedLinear.cs (1)
185return (TotalBias + VectorUtils.DotProduct(in feat, in TotalWeights)) / (float)NumWeightUpdates;
Standard\Online\LinearSvm.cs (1)
258=> Bias + VectorUtils.DotProduct(in feat, in Weights) * WeightsScale;
Standard\Online\OnlineLinear.cs (1)
237=> Bias + VectorUtils.DotProduct(in feat, in Weights) * WeightsScale;
Standard\SdcaBinary.cs (3)
132return VectorUtils.DotProduct(in weights, in features) + bias; 137return VectorUtils.DotProduct(in weights, in features) * (float)scaling + bias; 319return VectorUtils.DotProduct(in weights, in features) + bias;