City University of Hong Kong · FACULTY OF INFORMATION TECHNOLOGY

IS6400 Chap.4 KMeans and Density-Based Clustering

- one subject, every graph, every model, every mark
6 Chapters2-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 4 of 10 · IS6400

KMeans and Density-Based Clustering

Different algorithms define groups differently

Bisecting KMeans repeatedly divides a cluster into compact groups around centres. DBSCAN connects records through dense neighbourhoods and can leave isolated records unassigned as noise.

Neither is universally better: the business use must decide whether every record needs a segment or whether refusal to assign is informative.

Distance makes preprocessing part of the model

Unscaled features with large ranges dominate Euclidean distance. Standardisation, feature weighting and the distance measure therefore change the meaning of similarity.

Cluster quality combines stability, coherence, separation, size and usefulness for an action rather than one universal accuracy score.

Define similarity in business terms

Before running an algorithm, state which differences should make two records meaningfully unlike. Annual spend, complaint count and product mix may require scaling or domain weights rather than equal raw Euclidean distance.

Remove identifiers and post-outcome fields that create artificial separation. The resulting feature space is the operational definition of a group, so document transformations and test whether a change in one feature can dominate all others.

Contrast forced assignment with noise

Centroid methods allocate every record to a centre and work best for compact groups of comparable shape.

Bisecting KMeans adds a hierarchy by repeatedly splitting one existing group. DBSCAN instead joins sufficiently dense neighbourhoods, can follow irregular shapes and leaves isolated records as noise.

Noise is not automatically bad data: it may identify rare customers or anomalies that deserve a separate review rather than a marketing label.

Validate without a labelled answer key

Vary cluster count, radius and minimum-neighbour settings, then record how membership, size and noise share change. Resample rows or test a later period to assess stability.

Profile the fixed clusters on outcomes not used to create them so the validation is not circular. Finally attach an action to each group and check whether the organisation can actually treat it differently. Separation without a distinct, defensible action is an attractive diagram rather than a useful segmentation.

In this chapter

What this chapter covers

  • 01

    Similarity as a business definition

  • 02

    Bisecting compact centroid groups

  • 03

    Density radius and neighbour count

  • 04

    Core, border and noise records

  • 05

    Scaling before distance calculation

  • 06

    Stability and action-based profiling

Worked example · free

Identify a dense group and its noise

Q [7 marks]. AskSia-authored practice. The listed marks are AskSia study allocations, not a University rubric. Points A(0,0), B(0,1), C(1,0), D(5,5) use radius 1.5 and a three-point minimum including the point itself. Identify the DBSCAN result.
The left panel partitions around centres.The left panel partitions around centres. The right panel follows a curved dense region and leaves the isolated red point as noise, revealing different group assumptions.Centroid splits prefer compact groups; density links follow neighbourhoodsBisecting KMeansDBSCAN plus noise
The left panel partitions around centres. The right panel follows a curved dense region and leaves the isolated red point as noise, revealing different group assumptions.
  • 3Check the neighbourhood of A, B and C. The marks used here are not a University assessment scheme.
  • 2Check D against the minimum.
  • 2Explain the business meaning of non-assignment.
A, B and C are pairwise close enough to lie within connected radius-1.5 neighbourhoods, and each reaches the three-point minimum when the point itself is counted. They form one dense cluster. D has no neighbour inside the radius and is labelled noise. Noise does not mean wrong data: it can represent an exceptional customer requiring separate review. A centroid method would force D into some group, so the preferred result depends on whether the campaign requires universal assignment or values exception detection.
Sia tip — State whether the minimum count includes the point itself before counting neighbours; silent convention changes alter the result.
Glossary

Key terms

Centroid
A representative centre used to summarise and assign records in a compact cluster.
Bisecting KMeans
A hierarchical procedure that repeatedly divides one existing cluster with a two-centre partition.
Density Radius
The maximum distance within which records count as neighbours for density clustering.
Core Point
A record meeting the required neighbour count inside the chosen radius.
Noise Point
A record not connected to a sufficiently dense neighbourhood under the chosen parameters.
FAQ

KMeans and Density-Based Clustering FAQ

Why can two reasonable clustering methods disagree?

They encode different group shapes. Centroid methods prefer compact groups around representatives and force assignments; density methods follow connected neighbourhoods and can leave sparse observations unassigned. The disagreement reflects assumptions, not necessarily an error.

What happens if features are not scaled?

Features with larger numeric ranges dominate distance, so the algorithm mostly groups on those units. Standardise or choose deliberate domain weights before treating a cluster as a meaningful customer or product pattern.

How should clusters be evaluated without labels?

Check stability across samples and parameters, within-group coherence, separation, size, profiles on variables not used to create them, and whether each group supports a distinct action. A mathematically separated group can still be operationally useless.

Study strategy

Exam move

Draw one compact two-centre example and one curved density-connected example. For each, state what happens to an isolated record. Practise neighbourhood counting with a declared radius and minimum.

Then take a business segmentation request and write whether every record must receive an action, which features define similarity, how they are scaled, how parameter sensitivity is reported, and how clusters are profiled on independent business outcomes. Repeat the example after multiplying one feature by one hundred to see why raw scale changes geometry.

Create a sensitivity grid for two cluster counts, two radii and two minimum-neighbour choices; record membership changes and noise share rather than selecting the prettiest plot. Close by assigning an action to each stable group and a review route to unassigned records. Practise explaining that changing a parameter changes the grouping rule rather than changing the underlying customers.

Name one independent outcome that could test whether the proposed segments support distinct actions.

A+Everything unlocked
Unlocks this Bible + all 31 of your subjects at City University of Hong Kong, plus 1,000+ more Bibles across the AskSia library.
Sia - your IS6400 tutor, unlimited, worked the way the exam marks it
The full 2-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works