queso_cluster.atoms.scores#

Functions#

calcDaviesBouldin(data, labels[, q])

calcNeighborSilhouetteScore(dataSquare, labelLine, point)

Calculates the Silhouette Score for a specific cluster

findSampleNeighbor(dataSquare, labelLine, pointIndx)

Calculates the nearest label to a given sample

speedTest(interSamples, intraSample, interIndxSize)

speedTest2(intraSamples, intraIndxSize, i)

Module Contents#

calcDaviesBouldin(data, labels, q=2)[source]#
calcNeighborSilhouetteScore(dataSquare, labelLine, point)[source]#

Calculates the Silhouette Score for a specific cluster

Parameters:
  • dataSquare (ndarray) – 2D array (nsamples, nfeatures) containing the pool of data

  • labelLine (ndarray) – 1D array (nsamples,) for the labels on the data

  • point (int) – cluster label to evaluate

Returns:

Silhouette Score

Return type:

int

findSampleNeighbor(dataSquare, labelLine, pointIndx)[source]#

Calculates the nearest label to a given sample

Parameters:
  • dataSquare (ndarray) – 2D array (nsamples, nfeatures) containing the pool of data

  • labelLine (ndarray) – 1D array (nsamples,) for the labels on the data

  • pointIndx (int) – sample index

Returns:

The label of the nearest cluster to that point

Return type:

int

speedTest(interSamples, intraSample, interIndxSize)[source]#
speedTest2(intraSamples, intraIndxSize, i)[source]#