scmorph.pp.corr

Contents

scmorph.pp.corr#

scmorph.pp.corr(X, Y=None, method='pearson', M=5)#

Compute pairwise correlations

Parameters:
  • X (ndarray) – One or two 1-D or 2-D arrays containing multiple variables and observations. When these are 1-D, each represents a vector of observations of a single variable. In the 2-D case, each row is assumed to contain an observation. Both arrays need to have the same length.

  • Y (Optional[ndarray] (default: None)) – One or two 1-D or 2-D arrays containing multiple variables and observations. When these are 1-D, each represents a vector of observations of a single variable. In the 2-D case, each row is assumed to contain an observation. Both arrays need to have the same length.

  • method (str (default: 'pearson')) – One of “pearson”, “spearman”, or “chatterjee” ([[Lin and Han, 2021]]_)

  • M (int (default: 5)) – Number of right nearest neighbors to use for Chatterjee correlation.

Return type:

ndarray

Returns:

corr Correlation coefficient