The first step in building a recommendation engine includes finding similar users in the database. The Euclidean distance score is one of the measures to find similarities.
Computing the Euclidean distance score
Getting ready
NumPy (Numerical Python) needs to be installed on Raspberry Pi 3 to calculate Euclidean distance. Readers can install numpy by typing the following command in the Raspberry Pi 3 Terminal:
sudo apt-get -y install python-numpy
How to do it...
- We will create a new Python file and import the following packages into it:
import json import numpy as...