Unit - 1 Machine Learning
Unit - 1 Machine Learning
Machine Learning
BTCS 618‐18
Dr. Vandana Mohindru
Topics to be discussed
• Why Machine Learning?
• What is Machine Learning
• How does Machine Learning Works
• Well‐Posed learning problems
• Applications of Machine Learning
• Designing a learning system
• Issues in machine learning
• Types of machine learning:
• Learning associations,
• Supervised learning,
• Unsupervised learning and
• Reinforcement learning.
Why Machine Learning?
BIG DATA
• Widespread use of personal computers and wireless communication
leads to “big data”
• We are both producers and consumers of data
• Data is not random, it has structure, e.g., customer behavior
• We need “big theory” to extract that structure from data for
(a) Understanding the process
(b) Making predictions for the future
Why Machine Learning?
• Recent progress in algorithms and theory
• Growing flood of online data
• Computational power is available
• Budding industry
Three niches for machine learning:
• Data mining : using historical data to improve decisions
medical records medical knowledge
• Software applications we can't program by hand
autonomous driving
speech recognition
• Self customizing programs
Newsreader that learns user interests
What is Machine Learning
• In the real world, we are
surrounded by humans who can
learn everything from their
experiences with their learning
capability, and we have
computers or machines which
work on our instructions.
• But can a machine also learn
from experiences or past data
like a human does? So here
comes the role of Machine
Learning.
What is Machine Learning
• Machine Learning is said as a subset of artificial intelligence that is
mainly concerned with the development of algorithms which allow a
computer to learn from the data and past experiences on their own.
The term machine learning was first introduced by Arthur Samuel in
1959. We can define it in a summarized way as:
• Thus, we seek the weights, or equivalently the Ṽ , that minimize E for the
observed training examples.
Choosing a Function Approximation Algorithm
• Several algorithms are known for finding weights of a linear function that
minimize E defined in this way.
• In our case, we require an algorithm that will incrementally refine the
weights as new training examples become available and that will be
robust to errors in these estimated training values.
• One such algorithm is called the least mean squares, or LMS training
rule. For each observed training example it adjusts the weights a small
amount in the direction that reduces the error on this training example.
Choosing a Function Approximation Algorithm
• The LMS algorithm is defined as follows:
• Here ɳ is a small constant (e.g., 0.1) that moderates the size of the
weight update.
The Final Design
• The final design of our checkers learning system can be naturally
described by four distinct program modules that represent the central
components in many learning systems.
• These four modules, summarized in Figure, are as follows:
a) The Performance System is the module that must solve the given
performance task, in this case playing checkers, by using the learned
target function(s). It takes an instance of a new problem (new game) as
input and produces a trace of its solution (game history) as output. In
our case, the strategy used by the Performance System to select its
next move at each step is determined by the learned Ṽ evaluation
function. Therefore, we expect its performance to improve as this
evaluation function becomes increasingly accurate.
The Final Design
• The final design of our checkers learning system can be naturally
The Final Design
b) The Critic takes as input the history or trace of the game and
produces as output a set of training examples of the target function. As
shown in the diagram, each training example in this case corresponds
to some game state in the trace, along with an estimate Vtrain of the
target function value for this example. In our example, the Critic
corresponds to the training rule given by Equation (estimating training
values).
Supervised learning model takes direct feedback to check if it is predicting Unsupervised learning model does not take any feedback.
correct output or not.
Supervised learning model predicts the output. Unsupervised learning model finds the hidden patterns in data.
In supervised learning, input data is provided to the model along with the In unsupervised learning, only input data is provided to the model.
output.
The goal of supervised learning is to train the model so that it can predict The goal of unsupervised learning is to find the hidden patterns and useful
the output when it is given new data. insights from the unknown dataset.
Supervised learning needs supervision to train the model. Unsupervised learning does not need any supervision to train the model.
Supervised learning can be used for those cases where we know the input Unsupervised learning can be used for those cases where we have only
as well as corresponding outputs. input data and no corresponding output data.
Supervised learning model produces an accurate result. Unsupervised learning model may give less accurate result as compared to
supervised learning.
Supervised learning is not close to true Artificial intelligence as in this, we Unsupervised learning is more close to the true Artificial Intelligence as it
first train the model for each data, and then only it can predict the correct learns similarly as a child learns daily routine things by his experiences.
output.
It includes various algorithms such as Linear Regression, Logistic It includes various algorithms such as Clustering, KNN, and Apriori
Regression, Support Vector Machine, Multi-class Classification, Decision tree, algorithm.
Bayesian Logic, etc.
Reinforcement Learning
What is Reinforcement Learning?
• Reinforcement Learning is a feedback‐based Machine learning technique in
which an agent learns to behave in an environment by performing the
actions and seeing the results of actions. For each good action, the agent
gets positive feedback, and for each bad action, the agent gets negative
feedback or penalty.
• In Reinforcement Learning, the agent learns automatically using feedbacks
without any labeled data, unlike supervised learning.
• Since there is no labeled data, so the agent is bound to learn by its
experience only.
• RL solves a specific type of problem where decision making is sequential, and
the goal is long‐term, such as game‐playing, robotics, etc.
• The agent interacts with the environment and explores it by itself. The
primary goal of an agent in reinforcement learning is to improve the
performance by getting the maximum positive rewards.
Reinforcement Learning
What is Reinforcement Learning?
• The agent learns with the process of hit and trial, and based on the experience, it
learns to perform the task in a better way. Hence, we can say that "Reinforcement
learning is a type of machine learning method where an intelligent agent (computer
program) interacts with the environment and learns to act within that." How a
Robotic dog learns the movement of his arms is an example of Reinforcement
learning.
• It is a core part of Artificial intelligence, and all AI agent works on the concept of
reinforcement learning. Here we do not need to pre‐program the agent, as it learns
from its own experience without any human intervention.
• Example: Suppose there is an AI agent present within a maze environment, and his
goal is to find the diamond. The agent interacts with the environment by performing
some actions, and based on those actions, the state of the agent gets changed, and it
also receives a reward or penalty as feedback.
• The agent continues doing these three things (take action, change state/remain in
the same state, and get feedback), and by doing these actions, he learns and explores
the environment.
Reinforcement Learning
What is Reinforcement Learning?
• The agent learns that what actions lead to positive feedback or
rewards and what actions lead to negative feedback penalty. As a
positive reward, the agent gets a positive point, and as a penalty, it
gets a negative point.
Reinforcement Learning
Key Features of Reinforcement Learning
• In RL, the agent is not instructed about the environment
and what actions need to be taken.
• It is based on the hit and trial process.
• The agent takes the next action and changes states
according to the feedback of the previous action.
• The agent may get a delayed reward.
• The environment is stochastic, and the agent needs to
explore it to reach to get the maximum positive rewards.
Reinforcement Learning
Types of Reinforcement learning
There are mainly two types of reinforcement learning, which are:
1. Positive Reinforcement:
• The positive reinforcement learning means adding something to increase the
tendency that expected behavior would occur again. It impacts positively on the
behavior of the agent and increases the strength of the behavior.
• This type of reinforcement can sustain the changes for a long time, but too much
positive reinforcement may lead to an overload of states that can reduce the
consequences.
2. Negative Reinforcement:
• The negative reinforcement learning is opposite to the positive reinforcement as it
increases the tendency that the specific behavior will occur again by avoiding the
negative condition.
• It can be more effective than the positive reinforcement depending on situation and
behavior, but it provides reinforcement only to meet minimum behavior.
Difference between Reinforcement Learning & Supervised
Learning