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)
94
centroids[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);
185
Host.Assert(_dimensionality ==
_centroids
[i].Length);
186
var values =
_centroids
[i].GetValues();
187
if (
_centroids
[i].IsDense)
200
foreach (var pair in
_centroids
[i].Items())
243
Contracts.Assert(
_centroids
[i].Length == _dimensionality);
244
var values =
_centroids
[i].GetValues();
246
if (!
_centroids
[i].IsDense)
247
writer.WriteIntsNoCount(
_centroids
[i].GetIndices());
270
_centroidL2s[i] = VectorUtils.NormSquared(
_centroids
[i]);
282
Contracts.Assert(
_centroids
.Length == _k);
285
_centroids
[i].CopyTo(ref centroids[i]);
323
var shapeC = new long[] {
_centroids
.Length,
_centroids
[0].Length };
325
foreach (var centriod in
_centroids
)
343
var dataViewType = new VectorDataViewType(NumberDataViewType.Single,
_centroids
.Length);