Compute the Local Inverse Simpson Index (LISI)
compute_simpson_index(
D,
knn_idx,
batch_labels,
n_batches,
perplexity = 15,
tol = 1e-05
)
Distance matrix of K nearest neighbors.
Adjacency matrix of K nearest neighbors.
A categorical variable.
The number of categories in the categorical variable.
The effective number of neighbors around each cell.
Stop when the score converges to this tolerance.