uniport.metrics.batch_entropy_mixing_score
- uniport.metrics.batch_entropy_mixing_score(data, batches, n_neighbors=100, n_pools=100, n_samples_per_pool=100)[source]
Calculate batch entropy mixing score
Algorithm
Calculate the regional mixing entropies at the location of 100 randomly chosen cells from all batches
Define 100 nearest neighbors for each randomly chosen cell
Calculate the mean mixing entropy as the mean of the regional entropies
Repeat above procedure for 100 iterations with different randomly chosen cells.
- param data:
np.array of shape nsamples x nfeatures.
- param batches:
batch labels of nsamples.
- param n_neighbors:
The number of nearest neighbors for each randomly chosen cell. By default, n_neighbors=100.
- param n_samples_per_pool:
The number of randomly chosen cells from all batches per iteration. By default, n_samples_per_pool=100.
- param n_pools:
The number of iterations with different randomly chosen cells. By default, n_pools=100.
- rtype:
Batch entropy mixing score