scib_rapids.kbet

Contents

scib_rapids.kbet#

scib_rapids.kbet(X, batches, alpha=0.05)[source]#

Compute kBET.

Parameters:
  • X (NeighborsResults) – A NeighborsResults object.

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

  • alpha (float (default: 0.05)) – Significance level for the statistical test.

Return type:

tuple[float, ndarray, ndarray]

Returns:

acceptance_rate

Kbet acceptance rate of the sample.

stat_mean

Kbet chi-square statistics per cell.

pvalue_mean

Kbet p-values per cell.