0% found this document useful (0 votes)
5 views5 pages

Deeplearning Avisualapproach Preview

Uploaded by

tzachyr2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views5 pages

Deeplearning Avisualapproach Preview

Uploaded by

tzachyr2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

AN OVERVIE W OF

1
MACHINE LE ARNING

This book is about deep learning, a subfield


of machine learning. The phrase machine
learning describes a growing body of tech-
niques that share a common goal: extracting
meaningful information from data. Here, data refers
to anything that can be represented numerically. Data
can be raw numbers (like stock prices on successive
days, the masses of different planets, or the heights of
people visiting a county fair), but it can also be sounds
(the words someone speaks into their cell phone), pictures (photographs of
flowers or cats), words (the text of a newspaper article or a novel), behavior
(what activities someone enjoys), preferences (the music or films someone
likes), or anything else that we can collect and describe with numbers.
Our goal is to discover meaningful information, where it’s up to us to
decide what’s meaningful. We usually want to find patterns that help us
understand the data or use past measurements to predict future events. For
example, we might want to predict a movie someone would like based on
movies they’ve already rated, read the handwriting on a note, or identify a
song from just a few notes.
We generally find the information we’re after in three steps: we iden-
tify the information that we want to find, we collect data that we hope will
hold that information, and then we design and run algorithms to extract as
much of that information as possible from that data.
In this chapter, we’ll cover some of the major movements in machine
learning. We’ll begin by discussing an early approach to machine learning
called an expert system. We’ll then discuss three of the major approaches
to learning: supervised learning, unsupervised learning, and reinforce-
ment learning. We’ll end the chapter by looking at deep learning.

Expert Systems
Before deep learning became practical on a widespread basis, a popular
approach to learning from data involved creating expert systems. Still used
today, these are computer programs intended to encapsulate the thought
processes of human experts such as doctors, engineers, and even musi-
cians. The idea is to study a human expert at work, watch what they do
and how they do it, and perhaps ask them to describe their process out
loud. We capture that thinking and behavior with a set of rules. The hope
is that a computer could then do the expert’s job just by following those
rules.
These kinds of systems can work well once they’re built, but they’re dif-
ficult to create and maintain. It’s worth taking a moment to see why. The
problem is that the key step of producing the rules, called feature engineer-
ing, can require impractical amounts of human intervention and ingenuity.
Part of deep learning’s success is that it addresses exactly this problem by
creating the rules algorithmically.
Let’s illustrate the problem faced by expert systems with a practical
example: recognizing digits. Let’s say that we want to teach a computer
to recognize the number 7. By talking to people and asking questions, we
might come up with a set of three small rules that let us distinguish a 7
from all other digits: first, 7s have a mostly horizontal line near the top of
the figure; second, they have a mostly northeast-southwest diagonal line;
and third, those two lines meet in the upper right. The rules are illustrated
in Figure 1-1.
This might work well enough until we get a 7 like Figure 1-2.

4 Chapter 1
Digit 7 = Horizontal + NE-SW + Lines meet
line diagonal at upper right
Figure 1-1: Top: A handwritten 7. Bottom: A set of rules for distinguishing a handwritten 7 from other digits.

Figure 1-2: A 7 that would not be recognized by the


rules of Figure 1-1 because of the extra horizontal line

Our set of rules won’t recognize this as a 7, because we hadn’t originally


considered that some people put a bar through the middle of the diagonal
stroke. So now we need to add another rule for that special case. In prac-
tice, this kind of thing happens over and over again to anyone developing
an expert system. In a problem of any complexity, finding a good and com-
plete set of rules is frequently an overwhelmingly difficult task. Turning
human expertise into a series of explicit instructions often means labori-
ously uncovering inferences and decisions that people make without even
realizing it, turning those into huge numbers of instructions, then adjust-
ing and hand-tuning those instructions to cover all of the situations that
were initially overlooked, debugging the rules where they contradict, and
so on, in a seemingly never-ending series of tasks performed on a massive,
complicated set of rules.
This process of finding the rules to accomplish a job is tough work: the
rules human experts follow are often not explicit, and as we saw, it’s easy
to overlook exceptions and special cases. Imagine trying to find a compre-
hensive set of rules that can mimic a radiologist’s thought process as they
determine whether a smudge on an MRI image is benign or not, or the way
an air-traffic controller handles heavily scheduled air traffic, or how some-
one drives a car safely in extreme weather conditions. To make things even
more complex, the technology, laws, and social conventions around human
activities are constantly changing, requiring us to constantly monitor,
update, and repair this tangled web of interconnecting rules.

An Overview of Machine Learning 5


Rule-based expert systems can be made to work in some cases, but the
difficulties of crafting the right set of rules, making sure they work properly
across a wide variety of data, and keeping them up to date, makes them
impractical as a general solution.
If we could only find and manage this set of rules, then computers
could indeed emulate some forms of human decision making. This is just
what deep learning is all about. These algorithms, given enough training
data, can discover the decision-making rules automatically. We don’t have to
explicitly tell the algorithm how to recognize a 2 or a 7, because the system
figures that out for itself. It can work out whether an MRI smudge is benign
or not, whether a cellphone’s photo has been ideally exposed, or whether
a piece of text was really written by some historical figure. These are all
among the many applications deep learning is already carrying out for us.
The computer discovers the decision-making rules by examining the
input data and extracting patterns. The system never “understands” what
it’s doing, as a person does. It has no common sense, awareness, or compre-
hension. It just measures patterns in the training data and then uses those
patterns to evaluate new data, producing a decision or result based on the
examples it was trained on.
Generally speaking, we train deep learning algorithms in one of three
different ways, depending on the data we have and what we want the com-
puter to produce for us. Let’s survey them briefly.

Supervised Learning
We’ll first consider supervised learning. Here, the word supervised is a syn-
onym for “labeled.” In supervised learning, we typically give the com-
puter pairs of values: an item drawn from a dataset, and a label that we’ve
assigned to that item.
For example, we might be training a system called an image classifier,
with the goal of having it tell us what object is most prominent in a photo-
graph. To train this system, we’d give it a collection of images, and accom-
pany each image with a label describing the most prominent object. So, for
example, we might give the computer a picture of a tiger and a label consist-
ing of the word tiger.
This idea can be extended to any kind of input. Suppose that we have a
few cookbooks full of recipes that we’ve tried out, and we’ve kept records on
how much we liked each dish. In this case, the recipe would be the input,
and our rating of it would be that recipe’s label. After training a program
on all of our cookbooks, we could give our trained system a new recipe, and
it could predict how much we’d enjoy eating the result. Generally speaking,
the better we’re able to train the system (usually by providing more pieces
of training data), the better its prediction will be.
Regardless of the type of data, by giving the computer an enormous
number of pairs of inputs and labels, a successful system designed for the
task will gradually discover enough rules or patterns from the inputs that
it will be able to correctly predict each provided label. That is, as a result of
this training, the system has learned what to measure in each input so that

6 Chapter 1
it can identify which of its learned labels it should return. When it gets the
right answer frequently enough for our needs, we say that the system has
been trained.
Keep in mind that the computer has no sense of what a recipe actually
is, or how things taste. It’s just using the data in the input to find the closest
matching label, using the rules it learned during training.
Figure 1-3 shows the results of giving four photographs to a trained
image classifier.
These photos were found on the web, and the system had never seen
them before. In response to each image, the classifier tells us the likelihood
for each of the 1,000 labels it was trained to recognize. Here we show the
top five predictions for each photo, with their associated probabilities.
The picture in the upper left of Figure 1-3 is a bunch of bananas, so
ideally we’d like to get back a label like bunch of bananas. But this particular
classifier wasn’t trained on any images labeled bunch of bananas. The algo-
rithm can only return one of the labels it was trained on, in the same way
that we can only identify objects by the words we know. The closest match
it could find from the labels it was trained on was just banana, so that’s the
label it returned to us.
Banana
Zucchini
Slug
Coral fungus
Pineapple

Tabby
Tiger cat
Egyptian cat
Remote control
Mouse
Ear
Corn
Banana
American lobster
Knot
Reflex camera
Lens cap
Binoculars
Polaroid camera
Tripod

Figure 1-3: Four images and their predicted labels, with probabilities, from a deep learn-
ing classifier

An Overview of Machine Learning 7

You might also like