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

    1. Calculate the regional mixing entropies at the location of 100 randomly chosen cells from all batches

    1. Define 100 nearest neighbors for each randomly chosen cell

    1. Calculate the mean mixing entropy as the mean of the regional entropies

    1. Repeat above procedure for 100 iterations with different randomly chosen cells.

Parameters
  • data – np.array of shape nsamples x nfeatures.

  • batches – batch labels of nsamples.

  • n_neighbors – The number of nearest neighbors for each randomly chosen cell. By default, n_neighbors=100.

  • n_samples_per_pool – The number of randomly chosen cells from all batches per iteration. By default, n_samples_per_pool=100.

  • n_pools – The number of iterations with different randomly chosen cells. By default, n_pools=100.

Return type

Batch entropy mixing score