numpy.corrcoef(x, y=None, rowvar=True, bias=<no value>, ddof=<no value>)
[source]
Return Pearson product-moment correlation coefficients.
Please refer to the documentation for cov
for more detail. The relationship between the correlation coefficient matrix, R
, and the covariance matrix, C
, is
The values of R
are between -1 and 1, inclusive.
Parameters: |
|
---|---|
Returns: |
|
See also
cov
Due to floating point rounding the resulting array may not be Hermitian, the diagonal elements may not be 1, and the elements may not satisfy the inequality abs(a) <= 1. The real and imaginary parts are clipped to the interval [-1, 1] in an attempt to improve on that situation but is not much help in the complex case.
This function accepts but discards arguments bias
and ddof
. This is for backwards compatibility with previous versions of this function. These arguments had no effect on the return values of the function and can be safely ignored in this and previous versions of numpy.
© 2005–2019 NumPy Developers
Licensed under the 3-clause BSD License.
https://docs.scipy.org/doc/numpy-1.17.0/reference/generated/numpy.corrcoef.html