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)
89Host.CheckParam(centroids[i].Length == _dimensionality, 101_inputType = new VectorDataViewType(NumberDataViewType.Single, _dimensionality); 124Host.CheckDecode(_dimensionality > 0); 132int count = ctx.Header.ModelVerWritten >= 0x00010002 ? ctx.Reader.ReadInt32() : _dimensionality; 133Host.CheckDecode(0 <= count && count <= _dimensionality); 134var 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); 155if (src.Length != _dimensionality) 156throw Host.Except($"Incorrect number of features: expected {_dimensionality}, got {src.Length}"); 181writer.WriteLine("Dimensionality: {0}", _dimensionality); 185Host.Assert(_dimensionality == _centroids[i].Length); 239writer.Write(_dimensionality); 243Contracts.Assert(_centroids[i].Length == _dimensionality);