![]() |
VOOZH | about |
In NumPy, We can compute pearson product-moment correlation coefficients of two given arrays with the help of numpy.corrcoef() function.
In this function, we will pass arrays as a parameter and it will return the pearson product-moment correlation coefficients of two given arrays.
Syntax: numpy.corrcoef(x, y=None, rowvar=True, bias=, ddof=) Return: Pearson product-moment correlation coefficientsLet's see an example:
Example 1:
Output
[[1. 1.] [1. 1.]]
Example 2:
Output
[[ 1. -0.98198051] [-0.98198051 1. ]]