Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pearsons correlation calculation

# Import those libraries
from scipy.stats import pearsonr

# Apply the pearsonr()
corr, _ = pearsonr(list1, list2)
print('Pearsons correlation: %.3f' % corr)
 
# This code is contributed by Amiya Rout
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #pearsons #correlation #calculation
ADD COMMENT
Topic
Name
2+5 =