scib_metrics.isolated_labels(X, labels, batch, rescale=True, iso_threshold=None)[source]#

Isolated label score [Luecken et al., 2022].

Score how well labels of isolated labels are distiguished in the dataset by average-width silhouette score (ASW) on isolated label vs all other labels.

The default of the original scib package is to use a cluster-based F1 scoring procedure, but here we use the ASW for speed and simplicity.

  • X (ndarray) – Array of shape (n_cells, n_features).

  • labels (ndarray) – Array of shape (n_cells,) representing label values

  • batch (ndarray) – Array of shape (n_cells,) representing batch values

  • rescale (bool (default: True)) – Scale asw into the range [0, 1].

  • iso_threshold (Optional[int] (default: None)) – Max number of batches per label for label to be considered as isolated, if integer. If None, considers minimum number of batches that labels are present in

Return type: