Introduction To ML and DL
Introduction To ML and DL
PSV Nataraj
References
Deep Learning: From Basics to Practice, Volumes 1 and 2, Andrew Glassner, The
Imaginary Institute, Seattle, WA, 2018 http://www.imaginary-institute.com.
Deep Learning, Ian Goodfellow, Yoshua Bengio, Aaron Courville, MIT Press, 2017.
http://www.deeplearning- book.org/
Why this lecture?
• This Lecture is to help us get familiar with the big ideas and basic
terminology of machine learning.
• The phrase machine learning describes a growing body of techniques
that all have one goal: discover meaningful information from data.
• Here, “data” refers to anything that can be recorded and measured.
“Data” refers to anything that can be recorded or
measured.
• Data can be
• raw numbers (like stock prices on successive days, the mass of different
planets, the heights of people visiting a county fair).
• 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),
• or anything else that we want to investigate.
• “Meaningful information” is whatever we can extract from the data
that will be useful to us in some way.
• We decide what’s meaningful to us, and then we design an algorithm
to find as much of it as possible from our data.
What’s machine learning?
• The phrase “machine learning” describes a wide diversity of
algorithms and techniques.
• It’s used by so many people in so many different ways that it’s best to
consider it as:
• term is also used to describe when we use the computer to find these
features for us.
• It’s easy to overlook one rule, or even lots of them. It's a tough job !
How does ML compare with Expert systems?
• Expert Systems: Difficult to manually find right set of rules, & make
sure they work properly across a wide variety of data. This difficulties
have doomed expert systems.
• ML Systems: Beauty is they learn a dataset’s characteristics
automatically.
• Don’t have to tell an algorithm how to recognize a cat or dog, because system
figures that out for itself.
• Flip side of ML: To do its job well, ML system often needs a lot of
data. Enormous amounts of data.
Why recent explosion in ML ?
• Why has machine learning has exploded in popularity and
applications in the last few years?
• Couple of big reasons:
A. Flood of data: provided by the Internet has let these tools extract a
lot of meaning from a lot of data.
Example: Online companies make use of every interaction with every customer to
accumulate more data. Then they use it as input to ML algorithms, getting more
information about customers.
B. Increased Computing power - GPUs
Compare ML &
DL
- Fit the best
line
• Find the best straight line
through a bunch of data points,
see Figure
Semi-
Supervised Problem: Want hundreds of carpets, all over the warehouse.
Persian Carpets Our budget is nowhere near big enough to buy, or even
borrow, hundreds of unique carpets.
in Movie So instead, we buy just a few carpets, and then we give them
to our props department to make many fake carpets.
Semi-Supervised Learning (Generators)
Example - Persian Carpets in Movie
Made by ML Algorithms.
• This process of data generation is
implemented by ML algorithms called
generators.
• Train generators with large numbers of
examples - so that they can produce new
Semi- • versions with lots of variation.
• We don’t need labels to train generators, so its
Supervised unsupervised learning techniques.
Learning • But we do give generators some feedback as
they’re learning, so they know if they’re
(Generators) making good enough fakes for us or not.
• A generator is in the middle ground. It doesn’t
have labels, but it is getting some feedback
from us. We call this middle ground semi-
supervised learning.
• Suppose you are take care of a friend’s three-year old
daughter.
• You have no idea what the young girl likes to eat.
• First dinner: make Pasta with butter. She likes it!
• Repeat this dinner for a week. She gets bored.
• Week 2: Add some cheese, and she likes it.
Reinforcement • Repeat this dinner for week 2. She gets bored.
Learning - • Week 3: Try pesto sauce. But girl refuses to take a bite.
• So pasta + marinara sauce , and she rejects that too.
Example#1
• Frustrated, you make a baked potato with cream. She
likes it!
• Weeks 3 & 4 : Try one recipe and one variation after
another, trying to develop a menu that the child will
enjoy.
• Only feedback: Little girl eats the meal, or she doesn’t.
• Approach to learning is Reinforcement Learning !
• Agent: Autonomous car
• Environment: Traffic/people on the
street.
RL Example #2: • Actions: Driving
• Feedback: Driving okay if following
traffic rules and keep everybody safe.
• Agent: DJ at a dance club
• Environment : Dancers
RL Example #3:
• Feedback: Like or dislike the music.
• Agent makes decisions and takes actions (the
chef).
• Environment is everything else in the universe
(the child).
• Environment gives feedback or a reward signal
Reinforcement to agent after every action
• Feedback tells how good or bad that action is.
Learning - • The reward signal is often just a single number,
formally where larger positive numbers mean the action
was considered better, while more negative
numbers can be seen as punishments.
• The reward signal is not a label, nor a pointer to
a specific kind of “correct answer.”
• Next figure shows the idea of RL
Reinforcement
Learning (Contd.)
In reinforcement learning,
An agent (who acts)
An environment
(everything except agent).
• It is also the name of the scientific field which studies how to create computers and
computer software that are capable of intelligent behavior.
• AI definition: “It is the study of how to train the computers so that computers can do
things which at present human can do better.”
• It is a subset of AI
• ML builds algorithms that are guided by data (rather than relying on human
programmers to provide explicit instructions)
• ML uses training sets to infer models that are more accurate than humans
could build on their own.
Neural Networks
• Within the field of ML, neural networks are a subset of algorithms
built around a model of artificial neurons spread across three or more
layers
• There are many other ML techniques that don’t rely on neural
networks.
Deep Learning and Reinforcement learning
• Deep learning and reinforcement learning are machine learning
approaches, which in turn are a part of AI tools.
AI will go for finding the optimal ML will go for only solution for that
solution. whether it is optimal or not.