queso_cluster.atoms.scores#
Functions#
|
|
|
Calculates the Silhouette Score for a specific cluster |
|
Calculates the nearest label to a given sample |
|
|
|
Module Contents#
- 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