scparadise.scnoah.spearman_coef

Contents

scparadise.scnoah.spearman_coef#

scparadise.scnoah.spearman_coef(adata, adata_pred, feature, feature_pred, ndigits=3, print_res=False)[source]#

Compute Spearman correlation coefficient of predicted feature. Varies between -1 and +1.

Parameters:
  • adata (AnnData) – Annotated data matrix with features. Test dataset not used for model tuning or training.

  • adata_pred (AnnData) – Annotated data matrix with predicted features.

  • feature (str) – Name of the feature in adata.

  • feature_pred (str) – Name of the predicted feature in adata_pred.

  • ndigits (int (default: 3)) – Round a number to a given precision in decimal digits.

  • print_res (bool (default: False)) – Print results or not.

  • p-value. (Returns dictionary with Spearman correlation coefficient and)

  • correlation (Values close to 1 indicate strong positive)

  • correlation. (and values close to -1 indicate strong negative)