matrix_correlation

matrix_correlation#

class brainpy.measure.matrix_correlation(x, y, numpy=True)[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 (ndarray) – First matrix.

  • y (ndarray) – Second matrix

  • numpy (bool) – Whether we use numpy array as the functional output. If False, this function can be JIT compiled.

Returns:

coef – Correlation coefficient

Return type:

ndarray