calculate_pearson_r#

cinnabar.stats.calculate_pearson_r(y_true: ndarray, y_pred: ndarray) float[source]#

Compute Pearson’s r between true and predicted values.

Parameters:
  • y_true (ndarray with shape (N,)) – True values

  • y_pred (ndarray with shape (N,)) – Predicted values

Returns:

r – Pearson’s r between true and predicted values

Return type:

float