Which function is used to calculate the Pearson correlation coefficient in NumPy?
Correct answer
B. np.corrcoef()
15 views
B. np.corrcoef()
15 views
np.corrcoef() returns the matrix of Pearson correlation coefficients, with values between −1 and +1.
np.cov() gives covariance, np.correlate() computes signal cross-correlation, and np.corr() does not exist.
Practise more Data Science MCQs with answers and explanations on MCQsExam.com.
Not sure why the answer is B? Ask here and get an explanation.