Data Science
Data science turns recorded observations into defensible descriptions, inferences, predictions, decisions, and communication. The work begins before modeling, with measurement and provenance, and continues after modeling, with evaluation, interpretation, monitoring, and the consequences of use.
The model is one station in a longer chain from measurement to evidence to action.
These planned branches separate major kinds of work so navigation is clear. Real projects move between them repeatedly: exploration can expose a collection problem, evaluation can force a feature redesign, and communication can reveal that the original metric was answering the wrong question.
Different analytical goals can use the same dataset while requiring different evidence.
Watch a fitting objective create a partition without turning that partition into ground truth.
How does alternating assignment and recentering create a partition from unlabeled coordinates?
Choose k, assign each point to its nearest centroid, then move every centroid to the mean of its assigned points. Repeating those two steps reduces the within-cluster squared-distance objective until the assignments stabilize at a local solution.
K-means does not discover a uniquely true set of categories. Results depend on k, initialization, feature scaling, outliers, and the geometry of the data. It works best when squared Euclidean distance and roughly compact clusters are meaningful for the problem.
With k = 3, the toy sample contains three compact spatial clouds, so the chosen geometry is favorable to K-means. Try k = 2 or k = 4 to see that the algorithm will still produce a partition even when that partition does not match the sample's generating structure.
A clean metric cannot rescue a contaminated question.
The most consequential failures often happen outside the optimization loop: a target that does not measure the intended concept, leakage from the future, an evaluation set tuned into a training set, a deployment population that differs from development, or a metric that ignores the cost of mistakes.
What patterns are present in the observed data?
How accurately can an outcome be estimated for relevant unseen cases?
How would the outcome change under an intervention?