liveBook · Manning

Data augmentation

As explained in Delivering Machine Learning Projects: From design to deployment

Data augmentation is the creation of additional training examples by applying transformations or alterations to existing data.

Data augmentation creates extra training examples by applying transformations or alterations to existing data. It broadens narrow datasets so models are less likely to learn coincidental features and can become more robust and general. section 7.2.1

Use augmentation processes to widen the signals available during training:

  • Images: rotate, mirror, scale, reposition, invert, alter contrast or brightness, add objects, and introduce noise or distortions. section 7.2.1
  • Text: add spelling errors, replace non-stop words with synonyms, or use auto-translation to change phrasing. section 7.2.1
  • Pipelines: preserve maintainable infrastructure so new manipulations can be added while models are tested and compared. section 5.4

Augmenting a cat image

Start with one cat image, then generate additional examples by rotating, adding objects, introducing noise, inverting, scaling, repositioning, and mirroring it. section 7.2.1

Figure 7.3 Augmenting an image of a cat with simple manipulations (Wikipedia commons, https://commons.wikimedia.org/wiki/File:Black_and_White_Cat_Sketch.svg).

Inspect the visual sequence of simple image manipulations used to create augmented examples. section 7.2.1

How Delivering Machine Learning Projects: From design to deployment covers it

How deep it goes
Explains the rationale and lists image and text transformations, while leaving implementation details of each manipulation unspecified.
Examples
Uses rotated, mirrored, noisy, scaled, repositioned, and otherwise altered cat images, plus spelling, synonym, and translation changes for text.
What it assumes
Assumes existing training data and introduces the technique without requiring advanced mathematical treatment.
What you can do after
Build additional training data that can help models become more robust when original examples are narrow.
How it connects
Connects data augmentation with training data, data pipelines, unstructured data, model robustness, and model evaluation.

Also explained in

Compare how 9 books explain data augmentation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Delivering Machine Learning Projects: From design to deployment. The section links point to the parts of the book it draws on.