2 writes to _dimensionality
Microsoft.ML.KMeansClustering (2)
KMeansModelParameters.cs (2)
83
_dimensionality
= centroids[0].Length;
123
_dimensionality
= ctx.Reader.ReadInt32();
14 references to _dimensionality
Microsoft.ML.KMeansClustering (14)
KMeansModelParameters.cs (14)
89
Host.CheckParam(centroids[i].Length ==
_dimensionality
,
101
_inputType = new VectorDataViewType(NumberDataViewType.Single,
_dimensionality
);
124
Host.CheckDecode(
_dimensionality
> 0);
132
int count = ctx.Header.ModelVerWritten >= 0x00010002 ? ctx.Reader.ReadInt32() :
_dimensionality
;
133
Host.CheckDecode(0 <= count && count <=
_dimensionality
);
134
var indices = count <
_dimensionality
? ctx.Reader.ReadIntArray(count) : null;
137
_centroids[i] = new VBuffer<float>(
_dimensionality
, count, values, indices);
143
_inputType = new VectorDataViewType(NumberDataViewType.Single,
_dimensionality
);
155
if (src.Length !=
_dimensionality
)
156
throw Host.Except($"Incorrect number of features: expected {
_dimensionality
}, got {src.Length}");
181
writer.WriteLine("Dimensionality: {0}",
_dimensionality
);
185
Host.Assert(
_dimensionality
== _centroids[i].Length);
239
writer.Write(
_dimensionality
);
243
Contracts.Assert(_centroids[i].Length ==
_dimensionality
);