Computing a Pearson correlation score

Euclidean distance assumes that the sample points are distributed about the sample mean in a spherical manner, which is not always true. Hence, the Pearson correlation score is used instead of the Euclidean distance score. The computation of the Pearson correlation score is explained next.

Get Raspberry Pi 3 Cookbook for Python Programmers - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.