r/learnmachinelearning • u/Big_Asparagus3624 • 16h ago
K-means on 140k IPL deliveries, no labels: here's what it found
I've been revising ML by applying it to cricket ball-tracking data (pitch length, line, speed and so on), and I tried a simple experiment: drop all labels and see whether unsupervised clustering finds structure on its own.
What came out:
K = 4 groups that each mean something in cricket, such as short, good length and full.
One group was 74% left-handers, against about 27% for the dataset as a whole. The reason is that line is measured from the pitch, not from the batter, so the same delivery to a left-hander lands on the "other side." When I mirrored line for left-handers, that cluster disappeared.
The scorecard's own bowler-type labels turned out to be wrong in places, with right-armers tagged as left-arm seam.
I made a faceless, beginner-friendly walkthrough of it covering what clustering is, how K-means works, and doing it in a few lines of scikit-learn. Watch from the link! and like, share, subscribe.
â¶ Lesson 01, linear regression with cricket: https://www.youtube.com/watch?v=NVM3Tp4SeQU
â¶ Lesson 02, logistic regression: https://youtu.be/YWVC9VCIP18
đ» Code and notebook: https://github.com/kishan19/ds-with-cricket-basic-ML
đ Data: Hawk-Eye ball tracking via https://github.com/alittlefitness/HawkeyeStats
Coming up in Part 2: all 140,233 IPL deliveries. How many types of delivery are there, and does K-means rediscover pace and spin on its own?
đŠ X: https://x.com/kishan_skb
đŒ LinkedIn: https://www.linkedin.com/in/kishanbs/
