L12 | English F3 Student Learning Log

Persona: I'm a Form 3 (Grade 9) student and I only read English. I know basic Python (variables, for loops, lists) and school algebra up to quadratics. I learn from the official pages, the videos with captions, and the book. Kaggle notebook steps are written as a practice log that follows the official notebooks.

What I understood (in my own words)

  • Clustering means putting similar things in the same pile.
  • Mean shift: each point looks at its neighbours and moves towards their centre; after a few rounds, groups form.
  • The Gaussian kernel lets near points 'speak louder' and far points hardly count.
  • einsum is a short notation where letters stand for dimensions.

Where I got stuck, and how I got unstuck

Where I got stuckHow I solved it
einsum letter rulesI memorised one example: 'ik,kj->ij' is matrix multiplication, and k is the dimension that gets summed away.
CUDA kernelsI think of it as thousands of tiny workers on the GPU each computing one cell, and skipped the code details.

My answers to the exercises

Q1. What is the Euclidean distance between A(0,0) and B(3,4)?

Pythagoras: √(3² + 4²) = √25 = 5.

Q2. In mean shift, why use a Gaussian kernel for weights instead of treating every point equally?

Far points usually belong to other clusters. With equal weights, every point would be pulled to the centre of all the data and no clusters would form. The Gaussian kernel makes nearby points matter most, so each point moves to its own cluster's centre.

Q3. Give an everyday problem that clustering could solve.

A school canteen could cluster students' lunch choices to find groups (e.g. vegetarian regulars, noodle fans) and plan how many portions to prepare.

My Zettelkasten card

Card|'Birds of a feather flock together' can be written as an algorithm

Mean shift clustering is intuitive: every point moves towards the centre of its nearby companions, and after a few rounds similar points gather into groups. The key is that closer companions matter more, which is what the Gaussian kernel does.

It's like the first weeks of a school year. At first everyone sits apart, but each break people drift a little towards whoever they get on with. After two weeks there are natural groups (footballers, artists, gamers) and nobody decided how many groups there should be. That matches mean shift not needing a number of clusters. People's groups change over time, though, while the algorithm's points only move towards the centre, so real life is messier than the model.

My next step: draw 10 points on paper, do two rounds of 'move to the average of your neighbours' by hand, and see if two groups form.

🔗 Related notes to grow next: → Maths: 'Pythagoras is the basis of distance' → Social: 'Groups form by small steps towards each other' → Data: 'When unsure how many groups, let the data decide'


Back to lesson note:L12_均值漂移分群_202611041526

Built with LogoFlowershow