1 write to _clusterDistances
Microsoft.ML.KMeansClustering (1)
KMeansPlusPlusTrainer.cs (1)
586
_clusterDistances
= new float[numSamplesPerRound, numRounds * numSamplesPerRound];
11 references to _clusterDistances
Microsoft.ML.KMeansClustering (11)
KMeansPlusPlusTrainer.cs (11)
620
Contracts.AssertValue(
_clusterDistances
);
621
Contracts.Assert(0 <= bestCluster && bestCluster <
_clusterDistances
.GetLength(1), "bestCluster must be between 0..clusterCount-1");
635
if (
_clusterDistances
!= null)
638
Contracts.Assert(0 <= newClusterIdxWithinSample && newClusterIdxWithinSample <
_clusterDistances
.GetLength(0), "newClusterIdxWithinSample must be between 0..numSamplesPerRound-1");
639
Contracts.Assert(0 <= oldClusterIdx && oldClusterIdx <
_clusterDistances
.GetLength(1));
641
_clusterDistances
[newClusterIdxWithinSample, oldClusterIdx] =
654
Contracts.Assert(0 <= newClusterIdxWithinSample && newClusterIdxWithinSample <
_clusterDistances
.GetLength(0),
656
Contracts.Assert((
_clusterDistances
== null) || (bestOldCluster == -1 ||
657
(0 <= bestOldCluster && bestOldCluster <
_clusterDistances
.GetLength(1))),
660
if (
_clusterDistances
!= null && bestOldCluster != -1)
663
float distanceBetweenOldAndNewClusters =
_clusterDistances
[newClusterIdxWithinSample, bestOldCluster];