scdrs.method.gearys_c#
- scdrs.method.gearys_c(adata, vals)[source]#
Compute Geary’s C statistics for an AnnData.
Adopted from ivirshup/scanpy
\(C=\frac{(N - 1)\sum_{i,j} w_{i,j} (x_i - x_j)^2}{2W \sum_i (x_i - \bar{x})^2}\)
- Parameters:
- adataAnnData object
adata.obsp[“Connectivities] should contain the connectivity graph, with shape (n_obs, n_obs).
- valsarray-like
Values to calculate Geary’s C for. If one dimensional, should have shape (n_obs,).
- Returns:
- Cfloat
Geary’s C statistics.