mantispy.metrics.lisi#
- mantispy.metrics.lisi(adata, key, use_rep='X_pca', perplexity=30, kind='auto')[source]#
Median LISI over rows.
- Parameters:
adata (
AnnData) – Object with the embedding to measure in.key (
str) –obscolumn whose labels the neighborhoods are scored over.use_rep (
str(default:'X_pca')) –obsmkey of the embedding.perplexity (
float(default:30)) – Perplexity the kernel width is calibrated to. Each neighborhood holds3 * perplexityrows, at mostn_obs - 1.kind (
str(default:'auto')) –"batch"names the resultilisi(higher is better mixed) and"label"names itclisi(lower means the biological groups stay separated)."auto"guesses from the column name: a key containing batch, plate, source, week or run is a batch and anything else a label, so"Metadata_Site"counts as a label. Passkindexplicitly when one table holds both, or the two rows get the same metric name.
- Return type: