liveBook · Manning

Sampling

As explained in Machine Learning System Design

Sampling is the process of selecting a subset of observations from a larger dataset for analysis or model training.

Sampling selects a useful subset of observations when a dataset is too large, imbalanced, or repetitive to use efficiently. section 6.4

Use sampling when:

  • A defined process generates large amounts of data without manual labeling, such as clickstreams from search engines or marketplaces. section 6.4
  • Duplicates or severe imbalance make indiscriminate training inefficient. section 6.4
  • Stratification can divide observations by key features or clusters, while assigning more weight to relevant groups such as recent data. section 6.4

A practical sampling decision

For a large clickstream dataset, split records into meaningful groups, limit redundant observations, and prioritize recent groups when time affects the problem. section 6.4

How Machine Learning System Design covers it

How deep it goes
Defines stratified selection and prioritization but does not develop specific sampling algorithms.
Examples
Uses clickstreams, feature-based groups, algorithmic clusters, and fresh-versus-old temporal groups.
What it assumes
Assumes a large dataset and a defined generation process, while treating group definition as the central design choice.
What you can do after
Apply stratification to reduce redundant data and emphasize groups relevant to the modeling problem.
How it connects
Connects sampling with active learning, stratification, dataset imbalance, duplicates, and weakly supervised data.

Also explained in

Compare how 23 books explain sampling →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning System Design. The section links point to the parts of the book it draws on.