2 writes to _centroids
Microsoft.ML.KMeansClustering (2)
KMeansModelParameters.cs (2)
86_centroids = new VBuffer<float>[_k]; 127_centroids = new VBuffer<float>[_k];
19 references to _centroids
Microsoft.ML.KMeansClustering (19)
KMeansModelParameters.cs (19)
94centroids[i].CopyTo(ref _centroids[i]); 96_centroids[i] = centroids[i]; 137_centroids[i] = new VBuffer<float>(_dimensionality, count, values, indices); 173-2 * VectorUtils.DotProduct(in _centroids[i], in src) + _centroidL2s[i] + instanceL2); 185Host.Assert(_dimensionality == _centroids[i].Length); 186var values = _centroids[i].GetValues(); 187if (_centroids[i].IsDense) 200foreach (var pair in _centroids[i].Items()) 243Contracts.Assert(_centroids[i].Length == _dimensionality); 244var values = _centroids[i].GetValues(); 246if (!_centroids[i].IsDense) 247writer.WriteIntsNoCount(_centroids[i].GetIndices()); 270_centroidL2s[i] = VectorUtils.NormSquared(_centroids[i]); 282Contracts.Assert(_centroids.Length == _k); 285_centroids[i].CopyTo(ref centroids[i]); 323var shapeC = new long[] { _centroids.Length, _centroids[0].Length }; 325foreach (var centriod in _centroids) 343var dataViewType = new VectorDataViewType(NumberDataViewType.Single, _centroids.Length);