brainpy.measure.matrix_correlation#

brainpy.measure.matrix_correlation(x, y)[source]#

Pearson correlation of the lower triagonal of two matrices.

The triangular matrix is offset by k = 1 in order to ignore the diagonal line

Parameters
  • x (tensor) – First matrix.

  • y (tensor) – Second matrix

Returns

coef – Correlation coefficient

Return type

tensor