← 返回学院
A student positions a clear circular guide over bus-stop symbols on a neighbourhood map while a teacher points at a nearby stop.
AI 知识核心2026年11月21日· 2 分钟

Density-Based Clustering With DBSCAN

DBSCAN groups points by local density using a radius epsilon and a minimum sample count. Core points start clusters, border points join nearby clusters, and noise points are sparse under the chosen settings.

density clusteringDBSCAN parametersdata literacy

来源

完整课程摘要

A teacher spreads a dot map on the table and asks why some dots seem to belong together while others sit alone. DBSCAN answers with two numbers. Epsilon is a radius measured in the same units as the data, such as metres on a map or points on a test. Minimum samples is the number of neighbours that must fall inside that radius before a point can start a cluster. In scikit-learn the point itself counts as one of those neighbours, so minimum samples of four means the point plus three others. Raising minimum samples or lowering epsilon demands denser evidence before a cluster forms.

Each point earns one of three roles. A core point has at least the required number of neighbours within epsilon, so it sits in a dense pocket. A border point has fewer neighbours itself but lies within epsilon of a core point, so it joins that cluster. A noise point lies within epsilon of no core point. Clusters grow by chaining. Start from a core point, add its neighbours, and treat any neighbour that is itself core as a new starting point. Because the cluster follows density rather than assuming a round shape, chained neighbourhoods can wrap around curves and connect irregular shapes that a centroid method would split.

Imagine a map of delivery stops in a city. Epsilon is 500 metres and minimum samples is five, including the stop itself. A cluster of six stops within 500 metres of one another forms a core region. A stop 400 metres from a core stop but with only two neighbours within 500 metres becomes a border point. A stop far from every core point, perhaps a rural address visited once, receives the noise label. Noise does not mean bad data. It means the point is sparse at this epsilon and this minimum samples.

Clusters of different density expose the model's limits. A loose suburb beside a tight downtown cluster may be labelled noise simply because one epsilon cannot serve both. Changing epsilon from 500 metres to 800 metres can absorb that suburb, while shrinking it to 300 metres may fragment the downtown cluster. The noise label is therefore model-dependent, a verdict from your settings rather than a property of the point. Units compound this. Epsilon in metres behaves differently from epsilon in kilometres, so always state units and scaling choices.

Give small groups a dot map on grid paper and ask them to mark core, border and noise points for epsilon of two squares and minimum samples of three, including the point itself. Each group writes a one-line justification beside every label, then the class compares maps made with epsilon of three. A student says, "This dot has three neighbours, so it is core." Another replies, "Then the dot beside it joins the cluster even though it has only one neighbour." Labels follow rules they can state, test and revise.