CelLink.metrics.calculate_graph_connectivity
- CelLink.metrics.calculate_graph_connectivity(data, labels, k=15)[source]
Calculate the Graph Connectivity for each cell type in the dataset.
- Parameters:
data (np.ndarray of shape (n_samples, n_features)) – The dataset where rows are samples and columns are features.
labels (array-like of shape (n_samples,)) – The cell type labels for each sample.
k (int, default=15) – Number of nearest neighbors to consider for each cell.
- Returns:
float – The graph connectivity score averaged across cell types.