statistics

k means clustering

Splitting data into groups around centres found iteratively.
25 related articles

Description

K-means clustering is an unsupervised learning algorithm that partitions a dataset into a predefined number of clusters, each represented by its centroid (the mean of its points). The goal is to minimize the within-cluster variance, making points in the same cluster as similar as possible while keeping different clusters distinct. It is one of the simplest and most widely used clustering methods, often serving as a baseline for more complex approaches.

History

The term 'k-means' was first used by James MacQueen in 1967, though the core idea dates back to Hugo Steinhaus in 1956 and Lloyd's algorithm (1957) for pulse-code modulation.

How it works

The algorithm starts by randomly initializing k centroids. It then iterates two steps: (1) assign each data point to the nearest centroid, and (2) recompute each centroid as the mean of all points assigned to it. These steps repeat until the centroids stop changing significantly. The result depends on the initial placement, so it is common to run the algorithm multiple times with different seeds and pick the best outcome. The number of clusters k must be chosen in advance, often using the elbow method or silhouette analysis.

In practice

K-means is used for customer segmentation in marketing, image compression by reducing color palettes, and anomaly detection by identifying points far from any centroid.

Fun fact

K-means is so efficient that it can cluster millions of points in seconds, but it assumes clusters are spherical and similar in size, which is rarely true in real data.

Related articles · 25

q-bio.SC2026-08-304 minarXiv:2608.29679
Ink Blots at the Cell Boundary: How Proteins Decide Where to Gather and Which Way to Look
Two ink reservoirs stand on opposite sides of the cell junction. From them, two types of monomers flow onto the membrane, and when they meet, they form viscous droplets of complexes. The droplets barely move, but the free monomers dart around as fast as perfume molecules in a room.
Stellar2026-08-223 minarXiv:2608.22065
Two Voices of One Wind
An interpreter in a room where three languages are spoken simultaneously first hears only a general noise. But if they start asking clarifying questions, listening to intonations, and repeatedly confirming who answered with which phrase, individual voices gradually emerge from the cacophony.
Galaxies2026-07-283 minarXiv:2607.26136
Cluster Crucible: Random Forest Identifies Returning Galaxies
Galaxy NGC 4254 lies 1.5 million light-years from the center of the Virgo cluster. It drags a long stream of cooling hydrogen — a sign that it's plowing headlong into the hot gas. Losing cold fuel quenches the birth of new stars.
Cosmology2026-07-222 minarXiv:2607.20721
How a Neural Network Reads the Invisible Pages of Galaxy Clusters
The temperature at the center of a galaxy cluster reaches a hundred million degrees. These largest gravitationally bound systems are natural laboratories where nature hides 85% of its mass in invisible dark matter.
Signal Processing2026-07-161 minarXiv:2607.14738express
The Complexity of Crowds: Why Averages Fail
Usually, the complexity of systems, from satellite motions to heart rhythms, is assessed with averaged entropy (a measure of unpredictability, as understood by Boltzmann). But that's like evaluating the ocean only by wave height: the average figure hides the full richness of underwater currents.
Machine Learning2026-07-161 minarXiv:2607.14995express
How to Teach AI Not to Confuse Similar MRI Scans
Ordinary AI looks at medical images like puzzles made of unfamiliar pieces: it considers any two unmatched pictures completely different. It's like trying to tell twins apart without knowing they're related. In medicine, however, patients with the same condition look nearly identical on MRI, and the algorithm mistakes 'relatives'.
Machine Learning2026-07-151 minarXiv:2607.14086express
Brain Signals: Learning to Understand Without a Teacher
The brain communicates in short electrical clicks. Previously, to learn this language, thousands of examples with translations from the experimenter were needed. MOJO takes a different path: like learning a language through immersion, it first listens to the 'stream of consciousness' without any hints and finds recurring patterns on its own.
Machine Learning2026-07-142 minarXiv:2607.12382express
gradCSCG: How an Algorithm Maps a Room by Mimicking a Child and Brain Neurons
A child exploring an unfamiliar apartment crawls from object to object and remembers what is visible from each corner. This is how the brain builds a mental map — an internal model of space. The gradCSCG algorithm works on the same principle: it receives a video stream from a camera and independently draws a map of the room, relying only on the changing images.
Topology by Aroma: How One Spin Gives Away the Quantum Phase
For a long time, identifying quantum phases was like interrogating a witness: you had to reach every corner of the system to uncover its secret. In the era of Landau, order was tied to symmetry breaking and a local parameter — everything plain as day.
Digital Polisher: How a Neural Network Unveils the Secrets of Binary Gravitational Lenses
Gravitational microlensing is a fascinating cosmic effect predicted by Einstein and developed by Zwicky. A massive body passing between us and a distant star bends its light like a lens, creating characteristic magnifications and distortions.
HEP Phenomenology2026-06-092 minarXiv:2606.10698express
A Narrow Laser for Heavy Integrals
Many cutting-edge physics calculations hit a brick wall — not for lack of ideas, but because of arithmetic. We're talking about integrals that express particle collision probabilities or the shape of gravitational wave bursts.
Physics and Society2026-05-241 minarXiv:2605.25248express
Communities by Size: When Networks Assemble Like a Puzzle
A social network is like a city: there are giant neighborhoods and tiny alleys. When an algorithm looks for tight-knit groups, it often picks out a couple of huge clusters and many small fragments. But the client (say, a municipality) needs districts of roughly equal size to distribute clinics or schools evenly.
Quantum Physics2026-05-012 minarXiv:2605.00981express
Quantum Triangle with No Buttons
Three people sit in three corners of a room. Each receives a sealed envelope from an invisible courier, but the couriers do not coordinate and have never met. The people open the envelopes and see a note with one word: "yes" or "no." They choose nothing themselves: they just read.
When Neural Networks See the World the Same Way
Show the same photo of a cat to two different neural networks, and they often reach a similar conclusion: "cat." But ask them for more detail, and their answers may diverge. One model focuses on the whiskers, another on the coat color, a third on the pose. So even within the "visual" world of neural networks, there's no complete unity.
q-bio.GN2026-04-182 minarXiv:2604.18621express
A Quantum Magnifier for Lung Cancer
Two nearly identical locks are opened by the same pick. They look alike on the outside, but inside the mechanisms differ. Much the same can be said for the two main types of non-small cell lung cancer — adenocarcinoma and squamous cell carcinoma. Under a microscope, they can be confused, yet they require different treatments. That's where the quantum "magnifier" comes in.
How to Tune a Silicon Detector for Accurate Particle Counting
In a particle accelerator, nuclei shatter into fragments like a porcelain cup dropped on the floor. Each fragment flies through silicon wafers, which register the impact and its strength. But to distinguish a real signal from random noise, you need a threshold: below it, readings are considered interference.
HEP Experiment2026-03-182 minarXiv:2603.18172express
How a Neural Network Sharpens Focus in Particle Showers
In the Large Hadron Collider's detectors, millions of particles are born every second. Their energy flashes in the calorimeter look like raindrops on a window pane: individual drops are visible, but when there are many and they merge, it's hard to make out each one. Physicists need to know exactly how much energy each particle carried and where it landed.
Computer Vision2026-03-151 minarXiv:2603.14503express
Neural Network Learns to See Dark Matter
Images of distant galaxies are riddled with curved arcs and smears — light warped on its way to us. This effect, predicted by Albert Einstein, acts like a giant funhouse mirror: a massive galaxy cluster distorts the images of background sources.
Applied Statistics2026-02-211 minarXiv:2602.18727express
Seeing Molecules Without Cheat Sheets
Glowing spots on a dark background: that's what single-molecule images from MINFLUX look like. This microscope can reveal details smaller than five nanometers: roughly ten thousand times thinner than a human hair.
Quantum Physics2026-02-152 minarXiv:2602.13990express
Quantum Threads: How Measurements Weave Connections
A quantum computer weaves a kind of thread from qubits, where each node is a particle and the connection between them is an entanglement. When a physicist measures a qubit, the thread changes: it breaks somewhere, gets sewn together somewhere else, and sometimes a twist appears on it.
Materials2026-01-242 minarXiv:2601.17262express
Crystal Map: How to Sort Through Millions of Images
An electron microscope scans a sample and records how electrons scatter off atoms at each point. The result is a giant stack of images — one for every point. These images encode information about how atoms are arranged: in neat rows or with a tilt, the orientation of the crystal lattice, and whether there are internal strains.
Cosmology2026-01-072 minarXiv:2601.03894express
Cosmos Trained to Predict
Thousands of universes were born in a computer, all to tell us about our own. Each one has its own galaxy clusters, arranged by the laws of gravity like peas in a jar shaken with varying force. From how the peas settle, you can tell what kind of hand shook the jar.
Cloud Spices: How a Neural Network Improves Climate
Climate forecasting is like a complex recipe: one wrong pinch and the whole dish is ruined. So it is with clouds — small but decisive. Climate models divide the sky into 50–100 km cells and don't see individual clouds. It's like throwing pepper by the handful when the recipe calls for a pinch.
Calibrating for Small Data: The GOAL Algorithm
An optician turns the frame, adjusts the focus, and a blurry spot becomes a sharp image. The new algorithm GOAL works much the same way: it rotates the data cloud, compresses redundant dimensions, and brings into focus what truly matters.
Where Does the Boundary Lie: Algorithm Finds Groups by Gaps in Data
Imagine a border river that separates two countries. On one bank live one group of people, on the other, another. The boundary between them is not always obvious: in some places the river is wide and calm, in others narrow and turbulent. But it is exactly where the current changes abruptly that the border becomes most noticeable.