The cover illustration of 'Deep Learning with Python, second edition' features a hand-colored engraving from Thomas Jefferys' collection, highlighting the diversity of regional dress from two centuries ago. The document discusses the evolution of artificial intelligence, machine learning, and deep learning, emphasizing the importance of understanding these concepts amidst media hype. It outlines the fundamental principles of machine learning, including the necessity of input data, expected outputs, and the process of learning through representation transformation.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0 ratings0% found this document useful (0 votes)
11 views6 pages
Class Notes Pyhon 1
The cover illustration of 'Deep Learning with Python, second edition' features a hand-colored engraving from Thomas Jefferys' collection, highlighting the diversity of regional dress from two centuries ago. The document discusses the evolution of artificial intelligence, machine learning, and deep learning, emphasizing the importance of understanding these concepts amidst media hype. It outlines the fundamental principles of machine learning, including the necessity of input data, expected outputs, and the process of learning through representation transformation.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 6
about the cover illustration
The figure on the cover of Deep Learning with Python, second edition, is captioned
“Habit of a Persian Lady in 1568.” The illustration is taken from Thomas Jefferys’ A
Collection of the Dresses of Different Nations, Ancient and Modern (four volumes), London,
published between 1757 and 1772. The title page states that these are hand-colored
copperplate engravings, heightened with gum arabic
Thomas Jefferys (1719-1771) was called “Geographer to King George III.” He was
an English cartographer who was the leading map supplier of his day. He engraved
and printed maps for government and other official bodies and produced a wide
range of commercial maps and atlases, especially of North America, His work as a map
maker sparked an interest in local dress customs of the lands he surveyed and
mapped, which are brilliantly displayed in this collection. Fascination with faraway
lands and travel for pleasure were relatively new phenomena in the late eighteenth
century, and collections such as this one were popular, introducing both the tourist as,
well as the armchair traveler to the inhabitants of other counties,
The diversity of the drawings in Jefferys’ volumes speaks vividly of the uniqueness
and individuality of the world’s nations some 200 years ago. Dress codes have changed
since then, and the diversity by region and county, so rich at the time, has faded away.
It's now often hard to tell the inhabitants of one continent from another, Pethaps, ty-
ing to view it optimistically, we've traded a cultural and visual diversity for a more varied
personal life—or a more varied and interesting intellectual and technical life.
Ata time when it’s difficult to tell one computer book from another, Manning cel-
ebrates the inventiveness and initiative of the computer business with book covers
based on the rich diversity of regional life of two centuries ago, brought back to life by
Jefferys’ pictures.What is deep learning?
This chapter covers
= Hightevel definitions of fundamental concepts
= Timeline of the development of machine leaming
= Key factors behind deep learning’ rising
popularity and future potential
In the past few years, artificial intelligence (AI) has been a subject of intense media
hype. Machine learning, deep learning, and AI come up in countless articles, often
outside of technology-minded publications. We're promised a future of intelligent
chatbots, selEdriving cars, and virtual assistants—a future sometimes painted in a
grim light and other times as utopian, where human jobs will be scarce and most,
economic activity will be handled by robots or AI agents. For a future or current
practitioner of machine learning, it's important to be able to recognize the signal
amid the noise, so that you can tell world-changing developments from overhyped
press releases. Our future is at stake, and it's a future in which you have an active
role to play: after reading this book, you'll be one of those who develop those AI
systems. So let's tackle these questions: What has deep learning achieved so far?
How significant is i? Where are we headed next? Should you believe the hype?
This chapter provides essential context around artificial intelligence, machine
learning, and deep learning.11
144
Harter 1 What is deep learning?
Artificial intelligence, machine learning,
and deep learning
First, we need to define clearly what we're talking about when we mention AI. What
are artificial intelligence, machine learning, and deep learning (see figure 1.1)? How
do they relate to each other?
Acie
Inteligence
Figure 1.1 Artificial intelligence,
‘machine learning, and deep learning,
Artificial intelligence
Artificial intelligence was born in the 1950s, when a handful of pioneers from the
nascent field of computer science started asking whether computers could be made to
“think”—a question whose ramifications we're still exploring today.
While many of the underlying ideas had been brewing in the years and even
decades prior, “artificial intelligence” finally crystallized as a field of research in 1956,
when John McCarthy, then a young Assistant Professor of Mathematics at Dartmouth
College, organized a summer workshop under the following proposal:
The study is to proceed on the basis ofthe conjecture that every aspect of learning or any
other feature of intelligence can in principle be so precisely described that a machine can
bbe made to simulate it, An attempt will be made to find how to make machines use
language, form abstractions and concepts, solve kinds of problems now reseroed for
‘humans, and improve themselves, We think that a significant advance can be made in
‘one or more of these problems if a carefully selected group of scientists work on it together
fora summer.
At the end of the summer, the workshop concluded without having fully solved the
riddle it set out to investigate. Nevertheless, it was attended by many people who
would move on to become pioneers in the field, and it set in motion an intellectual
revolution that is still ongoing to this day.
Concisely, AI can be described as the effort to automate intellectual tasks normally per-
formed by humans, As such, AT is a general field that encompasses machine learning and
deep leaning, but that also includes many more approaches that may not involve any
learning. Consider that until the 1980s, most AI textbooks didn't mention “learning” at112
Artificial intelligence, machine learning, and deep learning 3
all! Early chess programs, for instance, only involved hardcoded rules crafted by pro-
grammets, and didn’t qualify as machine learning. In fact, for a fairly long time, most
experts believed that human-level artificial intelligence could be achieved by having
programmers handcraft a sufficiently large set of explicit rules for manipulating
knowledge stored in explicit databases. This approach is known as symbolic AZ. Te was.
the dominant paradigm in AI from the 1950s to the late 1980s, and it reached its peak
popularity during the expert systems boom of the 1980s.
Although symbolic AT proved suitable to solve well-defined, logical problems,
such as playing chess, it turned out to be intractable to figure out explicit rules for
solving more complex, fuzzy problems, such as image classification, speech recogni-
tion, or natural language translation, A new approach arose to take symbolic Al's place:
‘machine learning.
Machine learning
In Victorian England, Lady Ada Lovelace was a friend and collaborator of Charles
Babbage, the inventor of the Analytical Engine: the firstknown general-purpose
mechanical computer. Although visionary and far ahead of its time, the Analytical
Engine wasn't meant as a general-purpose computer when it was designed in the
1830s and 1840s, because the concept of general-purpose computation was yet to be
invented. It was merely meant as a way to use mechanical operations to automate cer-
tain computations from the field of mathematical analysis—hence the name Analyti-
cal Engine, As such, it was the intellectual descendant of earlier attempts at encoding
mathematical operations in gear form, such as the Pascaline, or Leibniz’s step reck+
oner, a refined version of the Pascaline. Designed by Blaise Pascal in 1642 (at age 191),
the Pascaline was the world’s first mechanical caleulator—it could add, subtract, mul-
tiply, or even divide digits.
In 1843, Ada Lovelace remarked on the invention of the Analytical Engine,
The Analytical Engine has no pretensions whatever to originate anything: It can do
whatever we know how to order it to perform. .. Its province is to assist us im making
available what we're already acquainted with.
Even with 178 years of historical perspective, Lady Lovelace’s observation remains
anresting. Could a general-purpose computer “originate” anything, or would it always be
bound to dully execute processes we humans fully understand? Could it ever be capable
of any original thought? Could it learn from experience? Could it show creativity?
Her remark was later quoted by AI pioneer Alan Turing as “Lady Lovelace’s objec-
tion” in his landmark 1950 paper “Computing Machinery and Intelligence,”! which
introduced the Turing testas well as key concepts that would come to shape AL? Turing
AM. Turing, “Computing Machinery and Intelligence,” Mind 59, no, 236 (1950): 483-460,
* Although the Turing test has sometimes been interpreted a a literal test—a goal the field of AI should set out to
reach—Turing merely meantitas a conceptual device ina philosophical discussion about the nature of cognition,113
Harter 1 What is deep learning?
was of the opinion—highly provocative at the time—that computers could in princi-
ple be made to emulate all aspects of human intelligence.
The usual way to make a computer do useful work is to have a human programmer
write down rule-—a computer program—to be followed to tum input data into appro-
priate answers, just like Lady Lovelace writing down step-by-step instructions for the
Analytical Engine to perform. Machine learning turns this around: the machine looks
at the input data and the corresponding answers, and figures out what the rules
should be (see figure 1.2). A machine learning system is trained rather than explicitly
programmed. It’s presented with many examples relevant to a task, and it finds statisti-
cal structure in these examples that eventually allows the system to come up with rules,
for automating the task. For instance, if you wished to automate the task of tagging
your vacation pictures, you could present a machine learning system with many exam
ples of pictures already tagged by humans, and the system would learn statistical rules
for associating specific pictures to specific tags.
Rules —e[ Classical
[= Anowors
Data —+| _ programming
Data —+{ Machine
provers | amt = Rules Figure 2.2. Machine tearing:
‘anew programming paradigm
Although machine learning only started to flourish in the 1990s, it has quickly
become the most popular and most successful subfield of AI, a trend driven by the
availability of faster hardware and larger datasets. Machine learning is related to math-
ematical statistics, but it differs from statistics in several important ways, in the same
sense that medicine is related to chemistry but cannot be reduced to chemistry, as
medicine deals with its own distinct systems with their own distinct properties. Unlike
statistics, machine learning tends to deal with large, complex datasets (such as a data-
set of millions of images, each consisting of tens of thousands of pixels) for which clas-
sical statistical analysis such as Bayesian analysis would be impractical. As a result,
machine learning, and especially deep learning, exhibits comparatively little mathe-
matical theory—maybe too little—and is fundamentally an engineering discipline.
Unlike theoretical physics or mathematics, machine learning is a very hands-on field
driven by empirical findings and deeply reliant on advances in software and hardware,
Learning rules and representations from data
To define deep earningand understand the difference between deep learning and other
machine learning approaches, first we need some idea of what machine learning
algorithms do. We just stated that machine learning discovers rules for executing aArtificial intelligence, machine learning, and deep learning 3
data processing task, given examples of what's expected. So, to do machine learning,
we need three things
= Input data points—For instance, if the task is speech recognition, these data
points could be sound files of people speaking. If the task is image tagging, they
could be pictures,
= Examples of the expected output—in a speech-recognition task, these could be
human-generated transcripts of sound files. In an image task, expected outputs
could be tags such as “dog,” “cat,” and so on.
= A way lo measure whether the algorithm is doing a good job—This is necessary in
order to determine the distance between the algorithm's current output and its
expected output. The measurement is used as a feedback signal to adjust the
way the algorithm works. This adjustment step is what we call learning.
A machine learning model transforms its input data into meaningful outputs, a pro-
cess that is “learned” from exposure to known examples of inputs and outputs. There-
fore, the central problem in machine learning and deep learning is to meaningfully
transform data: in other words, to learn useful representations of the input data at
hand—representations that get us closer to the expected output.
Before we go any further: what's a representation? At its core, it's a different way to
look at data—to represent or encode data. For instance, a color image can be encoded
in the RGB format (red-green-blue) or in the HSV format (hue-saturationwvalue)
these are two different representations of the same data, Some tasks that may be diffi-
cult with one representation can become easy with another, For example, the task
“select all red pixels in the image” is simpler in the RGB format, whereas “make the
image less saturated” is simpler in the HSV format. Machine learning models are all
about finding appropriate representations for their input data—transformations of
the data that make it more amenable to the task at hand.
Let's make this concrete, Consider an xaxis, a paxis, and
some points represented by their coordinates in the (x, y) sys.
tem, as shown in figure 1.3.
As you can see, we have a few white points and a few black
points. Let’s say we want to develop an algorithm that can take
the coordinates (x, y) of a point and output whether that
point is likely to be black or to be white. In this case,
= The inputs are the coordinates of our points.
= The expected outputs are the colors of our points.
Figure 1.3 Some
= Away to measure whether our algorithm is doing a good cample data
job could be, for instance, the percentage of points that
are being correctly classified.
What we need here is a new representation of our data that cleanly separates the white
points from the black points. One transformation we could use, among many other
possibilities, would be a coordinate change, illustrated in figure 1.4