liveBook · Manning

Machine learning

As explained in Deep Learning with Python, Third Edition

A class of methods that learn to map inputs to outputs by searching for useful representations and rules from example data and feedback.

Machine learning replaces hand-written task rules with rules learned from data. Instead of telling a program exactly how to turn each input into an answer, you train a model on examples and let it find statistical structure that helps produce answers for new inputs. It is a subfield of artificial intelligence; deep learning is one approach within machine learning. section 1.3 section 20.1.1

Tagging vacation pictures

Suppose you want to tag pictures as “landscape” or “food.” Provide pictures that people have already tagged. The model uses those examples to learn associations between pictures and tags, rather than relying on a programmer to write a rule for every possible image. section 1.3

For a task with known expected outputs, the practical ingredients are:

  • Input data, such as pictures or recordings of speech. section 1.4
  • Expected outputs, such as image tags or human-written transcripts. section 1.4
  • A measure of how far the model’s outputs are from those expected outputs. That feedback guides adjustments to the model; the adjustment is learning. section 1.4

The goal is not merely to memorize answers. A model learns transformations that make input data more useful for its task. Consider two ways to encode the same color image: RGB makes selecting red pixels simpler, while HSV makes reducing saturation simpler. A useful representation can turn a difficult operation into an easier one. Deep learning pursues this idea with stacks or graphs of layers whose weights are learned during training. section 1.4 section 20.1.1

Figure 1.2 Machine learning: a new programming paradigm
ai ml dl

Use the diagram to compare the two directions: conventional programming supplies rules for turning data into answers; machine learning uses data and answers to learn rules. section 1.3

How Deep Learning with Python, Third Edition covers it

How deep it goes
Defines learning through examples, expected outputs, feedback, and representations; leaves detailed training procedures to the deep-learning distinction.
Examples
Illustrates learning with tagged vacation pictures, speech transcripts, and RGB versus HSV image encodings.
What it assumes
Starts with familiar ideas of programs, inputs, and answers, then defines the data and feedback needed for learning.
What you can do after
Evaluate/understand it as learning task rules from examples and feedback, rather than specifying those rules by hand.
How it connects
Connects machine learning to artificial intelligence, symbolic AI, representations, and deep learning.

Also explained in

Compare how 42 books explain machine learning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Deep Learning with Python, Third Edition. The section links point to the parts of the book it draws on.