
Calculate batch silhouette width from an embedding
rs_batch_silhouette_width.Rd
Computes the average silhouette width on batch labels using pairwise
distances in the embedding space. Values near 0 indicate good batch
mixing, values near 1 indicate batch separation.
Arguments
- embedding
Numeric matrix. The embedding to assess (e.g. PCA or corrected embedding). Rows are cells, columns are dimensions.
- batch_vector
Integer vector. The batch per cell. The codes need not be 0-based or contiguous.
- max_cells
Integer or NULL. If not NULL, subsample to this many cells for performance. If NULL, all cells are used.
- verbose
Boolean. Controls verbosity of the function.
- seed
Integer. Seed for subsampling reproducibility.