scib_metrics.clisi_knn#
- scib_metrics.clisi_knn(X, labels, perplexity=None, scale=True)[source]#
Compute the cell-type local inverse simpson index (cLISI) for each cell [Korsunsky et al., 2019].
Returns a scaled version of the cLISI score for each cell, by default [Luecken et al., 2022].
- Parameters:
X (
NeighborsResults) – ANeighborsResultsobject.labels (
ndarray) – Array of shape (n_cells,) representing cell type label values for each cell.perplexity (
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:
- Returns:
clisi cLISI score.