scib_metrics.ilisi_knn

Contents

scib_metrics.ilisi_knn#

scib_metrics.ilisi_knn(X, batches, perplexity=None, scale=True)[source]#

Compute the integration local inverse simpson index (iLISI) for each cell [Korsunsky et al., 2019].

Returns a scaled version of the iLISI score for each cell, by default [Luecken et al., 2022].

Parameters:
  • X (NeighborsResults) – A NeighborsResults object.

  • batches (ndarray) – Array of shape (n_cells,) representing batch values for each cell.

  • perplexity (Optional[float] (default: None)) – Parameter controlling effective neighborhood size. If None, the perplexity is set to the number of neighbors // 3.

  • scale (bool (default: True)) – Scale lisi into the range [0, 1]. If True, higher values are better.

Return type:

ndarray

Returns:

ilisi Array of shape (n_cells,) with the iLISI score for each cell.