Recall & Review
beginner
What is the Euclidean distance between two points?
Euclidean distance is the straight-line distance between two points in space. It is calculated as the square root of the sum of squared differences between corresponding coordinates.
Click to reveal answer
beginner
How does the Cosine distance measure similarity between two vectors?
Cosine distance measures the angle between two vectors. It calculates 1 minus the cosine of the angle, focusing on direction rather than magnitude.
Click to reveal answer
beginner
What is the Manhattan distance and when is it useful?
Manhattan distance is the sum of absolute differences between coordinates of two points. It is useful in grid-like path problems, like city blocks.
Click to reveal answer
intermediate
How to calculate Euclidean distance using scipy?
Use scipy.spatial.distance.euclidean(point1, point2) to get the Euclidean distance between two points.
Click to reveal answer
intermediate
What is the difference between Euclidean and Manhattan distances?
Euclidean distance measures straight-line distance, while Manhattan distance sums absolute differences along each axis, like moving along grid lines.
Click to reveal answer
Which distance metric measures the straight-line distance between two points?
✗ Incorrect
Euclidean distance is the straight-line distance between two points.
Which distance metric focuses on the angle between two vectors?
✗ Incorrect
Cosine distance measures similarity based on the angle between vectors.
Manhattan distance is best described as:
✗ Incorrect
Manhattan distance sums the absolute differences of coordinates.
Which scipy function calculates Euclidean distance?
✗ Incorrect
scipy.spatial.distance.euclidean() calculates Euclidean distance.
If you want to measure distance like walking city blocks, which metric is best?
✗ Incorrect
Manhattan distance sums absolute differences, like moving along grid paths.
Explain the differences between Euclidean, Cosine, and Manhattan distances with examples.
Think about how you measure distance walking straight, turning angles, or moving on a grid.
You got /4 concepts.
Describe how to use scipy to calculate Euclidean, Cosine, and Manhattan distances between two points.
Recall the scipy distance functions and their names.
You got /4 concepts.