Compute the Local Inverse Simpson Index (LISI)
1 2 3 4 5 6 7 8 | compute_simpson_index(
D,
knn_idx,
batch_labels,
n_batches,
perplexity = 15,
tol = 1e-05
)
|
D |
Distance matrix of K nearest neighbors. |
knn_idx |
Adjacency matrix of K nearest neighbors. |
batch_labels |
A categorical variable. |
n_batches |
The number of categories in the categorical variable. |
perplexity |
The effective number of neighbors around each cell. |
tol |
Stop when the score converges to this tolerance. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.