scib_metrics.graph_connectivity

scib_metrics.graph_connectivity#

scib_metrics.graph_connectivity(X, labels)[source]#

Quantify the connectivity of the subgraph per cell type label.

Parameters:
  • X (NeighborsResults) – Array of shape (n_cells, n_cells) with non-zero values representing distances to exactly each cell’s k nearest neighbors.

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

Return type:

float