internalsGet Pro

Module 03 · Lesson 10 of 12Pro

Norms and distances between data points

Level
Beginner
Topic
Linear algebra for machine learning
Reading time
14 min

When you finish this page you can

  1. Compute the L2, L1 and max norms of a vector by hand and with NumPy.
  2. Measure Euclidean and Manhattan distance between customers, and say when the two pick different nearest neighbours.
  3. Explain why features in different units wreck distances, and fix it with standardization.
  4. Choose between Euclidean and cosine distance, and name where models use norms.
  1. NumPy: arrays and vectorized maths14 min
  2. Vectors: lists of numbers with direction13 min
  3. Dot products: measuring how similar vectors are13 min

The closest customer to a leaver ordered 3 days ago

is our example online store. Farah, its ML engineer, works on a notebook sample of 200,000 customers. Customer C-3307 stopped buying in March. Joseph, who leads the growth team, wants a voucher sent early to the customers who look most like C-3307 does now.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan