maxfuse.utils.pearson_correlation

maxfuse.utils.pearson_correlation(arr1, arr2)[source]

Calculate the vector of pearson correlations between each row of arr1 and arr2.

Parameters:
  • arr1 (np.array of shape (n_samples, n_features)) – First dataset.

  • arr2 (np.array of shape (n_samples, n_features)) – Second dataset.

Returns:

np.array of shape (n_samples,), the i-th entry is the pearson correlation between arr1[i, (] and arr2[i, :].)