1 write to Centroids
Microsoft.ML.KMeansClustering (1)
KMeansPlusPlusTrainer.cs (1)
1059Centroids = new VBuffer<float>[k];
10 references to Centroids
Microsoft.ML.KMeansClustering (10)
KMeansPlusPlusTrainer.cs (10)
1061Centroids[j] = VBufferUtils.CreateDense<float>(dimensionality); 1079VBufferUtils.Clear(ref Centroids[i]); 1135VectorUtils.Add(in features, ref Centroids[cluster]); 1165VectorUtils.Add(in workChunkArr[i].Centroids[j], ref reducedState.Centroids[j]); 1211VectorUtils.Add(in CachedSum[i], ref Centroids[i]); 1214VectorUtils.ScaleBy(ref Centroids[i], (float)(1.0 / ClusterSizes[i])); 1218float clusterDelta = MathUtils.Sqrt(VectorUtils.L2DistSquared(in Centroids[i], in centroids[i])); 1225centroidL2s[i] = VectorUtils.NormSquared(Centroids[i]); 1229Utils.Swap(ref centroids[i], ref Centroids[i]);