Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Centroid Update in K-Means

HardSystem Design00:00
Practice interviewer
In session
5 left
00:00

Your question is Centroid Update in K-Means. Take a moment with it on the right.

Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).

You need to log in / sign up to chat or submit.

Problem

Prove mathematically why the mean is the appropriate centroid update for k-means (not just intuitively)

Asked in the round 3 stage. This was a k-means discussion with a principal applied scientist. Reported follow-ups included: “we know as ML engineers that mean is not robust to outliers... but who has proved why mean is equidistant from all data points”

Show the optimization objective for a fixed cluster, derive its minimizer, state the assumptions required, and distinguish the result from robustness and geometric intuition.