scib_rapids.pcr_comparison

Contents

scib_rapids.pcr_comparison#

scib_rapids.pcr_comparison(X_pre, X_post, covariate, scale=True, **kwargs)[source]#

Principal component regression (PCR) comparison.

Parameters:
  • X_pre (ndarray | ndarray) – Pre-integration array of shape (n_cells, n_features).

  • X_post (ndarray | ndarray) – Post-integration array of shape (n_cells, n_features).

  • covariate (ndarray | ndarray) – Array of shape (n_cells,) or (n_cells, 1) representing batch/covariate values.

  • scale (bool (default: True)) – Whether to scale the score between 0 and 1.

  • kwargs – Keyword arguments passed into principal_component_regression.

Return type:

float

Returns:

pcr_compared: float