Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23
Machine Learning UNIT-I
Introduction to Machine Learning:
• Machine learning is programming computers to optimize a performance criterion using example data or past experience.
• We have a model defined up to some parameters,
and learning is the execution of a computer program to optimize the parameters of the model using the training data or past experience.
• The model may be predictive to make predictions in
the future, or descriptive to gain knowledge from data, or both. • Learning is used when: – Human expertise does not exist (navigating on Mars),
– Humans are unable to explain their expertise
(speech recognition)
– Solution changes in time (routing on a computer
network)
– Solution needs to be adapted to particular cases
(user biometrics) What is Machine Learning? • ML is a specific subset of AI that trains machines how to learn.
• Optimize a performance criterion using
example data or past experience.
• Role of Computer science: Efficient algorithms
to – Solve the optimization problem – Representing and evaluating the model for inference. Learning: • Learning is the ability to improve one's behaviour based on past experience.
• Build computer systems that automatically
improve with experience
• Machine Learning explores algorithms that can
– learn from data / build a model from data – use the model for prediction, decision making or solving some tasks/problem • Types of Learning: • Supervised learning: • Supervised learning is the type of ML algorithms that require both input and output data is initially provided.
• Basically, data engineers create an algorithm, then
train it with a labeled dataset — the one that has actual input and output parameters.
• The result of a quality training process is the ability
to pick a function that gives the processes the input data in the most adequate and accurate way, as it was sampled in the training dataset. Unsupervised Learning: • Unsupervised learning is a type of algorithm which works with the input data having no examples or suggestions of the expected output. Its primary aim is to distribute the data into categories so that the output would be more informative compared to the loaded input. • The term unsupervised means that there is no supervisor who could tell the system right answers, in fact, there are no right or wrong answers in the first place.
• Unsupervised learning divides into the following subtypes:
• Association:- This ML subtype is basically making assumptions about some parts of the data proceeding from its characteristics we already know. This allows discovering fascinating interconnections between portions of data in large datasets.
• Clustering:- This kind of algorithm is very spread since it allows simply
grouping the pieces of data according to a certain trait. Reinforcement Learning : • It is about taking suitable action to maximize reward in a particular situation. • It is employed by various software and machines to find the best possible behavior or path it should take in a specific situation. • Reinforcement learning differs from supervised learning in a way that in supervised learning the training data has the answer key with it so the model is trained with the correct answer itself • whereas in reinforcement learning, there is no answer but the reinforcement agent decides what to do to perform the given task. In the absence of a training dataset, it is bound to learn from its experience. • In reinforcement learning, the algorithm (in this context also often referred to as agent) learns through trial-and-error using feedback to its own actions.
• Rewards and punishment operate as signals for
desired and undesired behavior.
• The best context to understand reinforcement
learning is in a game with a clear objective and a point system Example: The problem is as follows: We have an agent and a reward, with many hurdles in between. The agent is supposed to find the best possible path to reach the reward. The following problem explains the problem more easily. • The above image shows the robot, diamond, and fire. • The goal of the robot is to get the reward that is the diamond and avoid the hurdles that are fired. • The robot learns by trying all the possible paths and then choosing the path which gives him the reward with the least hurdles. • Each right step will give the robot a reward and each wrong step will subtract the reward of the robot. • The total reward will be calculated when it reaches the final reward that is the diamond. Applications in self-driving cars: • Some of the autonomous driving tasks where reinforcement learning could be applied include trajectory optimization, motion planning, dynamic pathing, controller optimization, and scenario-based learning policies for highways.
• For example, parking can be achieved by learning
automatic parking policies.
• Lane changing can be achieved using Q-Learning while
overtaking can be implemented by learning an overtaking policy while avoiding collision and maintaining a steady speed thereafter. • Reinforcement Learning applications in trading and finance:
• Supervised time series models can be used for
predicting future sales as well as predicting stock prices. • However, these models don’t determine the action to take at a particular stock price. • Enter Reinforcement Learning (RL). An RL agent can decide on such a task; whether to hold, buy, or sell. • The RL model is evaluated using market benchmark standards in order to ensure that it’s performing optimally. • Main points in Reinforcement learning –
• Input: The input should be an initial state from which the
model will start
• Output: There are many possible outputs as there are a variety
of solutions to a particular problem
• Training: The training is based upon the input, The model will return a state and the user will decide to reward or punish the model based on its output.
• The model keeps continues to learn.
• The best solution is decided based on the maximum reward.
• Compared to unsupervised learning, reinforcement learning is different in terms of goals. While the goal in unsupervised learning is to find clusters in your data (e.g. customer segments), reinforcement learning seeks to find a suitable action model that maximizes the total cumulative reward of the agent.
• Reinforcement learning is widely used in building AI for playing
computer games.
• A prominent example is Google’s computer program AlphaGo
Zero. It received massive media attention by defeating the South Korean world champion in the ancient Chinese game of Go.