utils.helper.HC

utils.helper.HC(latent, labels, num_clusters=[2, 3, 4, 7])[source]

Given a latent space for the CORTEX data set and labels, the function will perform hierarchical clustering (HC) on the latent space and calculate the NMI score.

Parameters

latent_spacenumpy ndarray

The latent space matrix.

labelsa numpy array or a list

The batch (or cluster) number of each sample in the latent space matrix.

num_clusterslist

A list of the number of cluusters to perform the HC.

Returns

nmislist

The NMI score of each number of clusters.