scalex.metrics.batch_entropy_mixing_score
- scalex.metrics.batch_entropy_mixing_score(data, batches, n_neighbors=100, n_pools=100, n_samples_per_pool=100)
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.
- type data:
- param data:
np.array of shape nsamples x nfeatures.
- type batches:
- param batches:
batch labels of nsamples.
- type n_neighbors:
- param n_neighbors:
The number of nearest neighbors for each randomly chosen cell. By default, n_neighbors=100.
- type n_samples_per_pool:
- param n_samples_per_pool:
The number of randomly chosen cells from all batches per iteration. By default, n_samples_per_pool=100.
- type n_pools:
- param n_pools:
The number of iterations with different randomly chosen cells. By default, n_pools=100.
- rtype:
Batch entropy mixing score