liveBook · Manning

Clustering

As explained in The Well-Grounded Data Analyst

Clustering is the process of grouping observations so that members of the same group are more similar to one another than to members of other groups.

Clustering groups observations that resemble one another, supporting actions tailored to customer or product segments. Because no correct labels exist, humans usually judge whether the groups are useful. section 12.1

Build a practical clustering analysis by:

  • Framing the action that each group should enable and selecting features that represent meaningful similarity. section 12.1
  • Inspecting missing values, incorrect values, outliers, feature variation, and visible patterns before modeling. section 12.4
  • Putting variables on comparable scales so distance-based methods do not let high-variation columns dominate. section 13.1.4
  • Choosing an algorithm and cluster count, assigning observations, then comparing groups for meaningful differences and distinct personas. section 12.4 section 13.1.4

Mobile-user segmentation

Segment users by unique apps, session count, average session duration, usage time, and dominant app type. Scale the variables, compare candidate values of k with inertia, assign users to seven KMeans clusters, and interpret the centers as personas such as heavy users, night owls, and usage outliers. section 13.1.4

Table 13.2 Summary of user personas
Group
Persona name
Persona characteristics
0
Typical social users
Average number of sessions, mostly social media, mostly late in the day and at night
1
Heavy users
High number of sessions and apps used, mostly social media, mostly late in the day and at night
2
Casual users
Low number of sessions and apps, short usage sessions, mostly for browsing
3
Night owls
All night owls, mostly social media use
4
Usage outliers
Averaging over 3,600 sessions in total over the period
5
Session length outliers
Averaging almost 10 minutes per usage session
6
Evening social users
Average number of sessions, short usage sessions, mostly for social media, mostly late in the day

Browse the persona summary to compare each cluster’s size-related behavior, timing, app preference, session length, and outlier characteristics. section 13.1.4

How The Well-Grounded Data Analyst covers it

How deep it goes
Explains exploratory checks, scaling, algorithm selection, assignment, cluster-count comparison, and persona-based evaluation.
Examples
Uses mobile browsing behavior, scaled user features, inertia comparisons, cluster assignments, centers, and named user personas.
What it assumes
Assumes a prepared user- or product-level dataset and teaches scaling, feature choice, allocation, and subjective evaluation.
What you can do after
Apply it via Python, pandas, matplotlib, and scikit-learn to produce and interpret actionable user segments.
How it connects
Connects clustering with unsupervised learning, similarity, feature scaling, distance, KMeans, outliers, and personas.

Also explained in

Compare how 18 books explain clustering →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Well-Grounded Data Analyst. The section links point to the parts of the book it draws on.