UNIT 1 Notes
UNIT 1 Notes
Department of CSE-AIML
Subject Notes
AL 405- Machine
Learning UNIT-I
Introduction to machine learning:
Machine learning is a tool for turning information into knowledge. Machine learning techniques are
used to automatically find the valuable underlying patterns within complex data that we would
otherwise struggle to discover. The hidden patterns and knowledge about a problem can be used to
predict future events and perform all kinds of complex decision making.
Tom Mitchell gave a “well-posed” mathematical and relational definition that “A computer program is
said to learn from experience E with respect to some task T and some performance measure P, if its
performance on T, as measured by P, improves with experience E.
For Example:
A checkers learning problem:
Task(T): Playing checkers.
Performance measures (P): Performance of games won.
Training Experience ( E ): Playing practice games against
itself. Need For Machine Learning
• Ever since the technical revolution, we’ve been generating an immeasurable amount of data.
• With the availability of so much data, it is finally possible to build predictive models that can
study and analyse complex data to find useful insights and deliver more accurate results.
• Top Tier companies such as Netflix and Amazon build such Machine Learning models by using
tons of data in order to identify profitable opportunities and avoid unwanted risks.
ML Vs AI Vs DL
• Model: A model is the main component of Machine Learning. A model is trained by using a
Machine Learning Algorithm. An algorithm maps all the decisions that a model is supposed to
take based on the given input, in order to get the correct output.
• Predictor Variable: It is a feature(s) of the data that can be used to predict the output.
• Response Variable: It is the feature or the output variable that needs to be predicted by using the
predictor variable(s).
• Training Data: The Machine Learning model is built using the training data. The training data
helps the model to identify key trends and patterns essential to predict the output.
• Testing Data: After the model is trained, it must be tested to evaluate how accurately it can
predict an outcome. This is done by the testing data set.
Gyan Ganga Institute of Technology and Sciences
Note: A Machine Learning process begins by feeding the machine lots of data, by using this data
the machine is trained to detect hidden insights and trends. These insights are then used to build a
Machine Learning Model by using an algorithm in order to solve a problem in Figure above.
• Increase in Data Generation: Due to excessive production of data, need a method that can be
used to structure, analyze and draw useful insights from data. This is where Machine Learning
comes in. It uses data to solve problems and find solutions to the most complex tasks faced
by organizations.
• Improve Decision Making: By making use of various algorithms, Machine Learning can be
used to make better business decisions.
For example, Machine Learning is used to forecast sales, predict downfalls in the stock
market, identify risks and anomalies, etc.
• Uncover patterns & trends in data: Finding hidden patterns and extracting key insights from
data is the most essential part of Machine Learning. By building predictive models and using
statistical techniques, Machine Learning allows you to dig beneath the surface and explore the
data at a minute scale. Understanding data and extracting patterns manually will take days,
whereas Machine Learning algorithms can perform such computations in less than a second.
• Solve complex problems: Building self-driving cars, Machine Learning can be used to solve
the most complex problems.
Limitations
1. What algorithms exist for learning general target function from specific training examples?
2. In what setting will particular algorithm converge to the desired function, given sufficient
training data?
3. Which algorithm performs best for which types of problems and representations?
Gyan Ganga Institute of Technology and Sciences
once trained it gets ready to predict the new data presented to it.
Gyan Ganga Institute of Technology and Sciences
Gyan Ganga Institute of Technology and Sciences
k-Fold Cross-Validation
Cross-validation is a resampling procedure used to evaluate machine learning models on a limited data
sample. Cross-validation is a statistical method used to estimate the skill of machine learning models.
It is commonly used in applied machine learning to compare and select a model for a given predictive
modeling problem because it is easy to understand, easy to implement, and results in skill estimates that
generally have a lower bias than other methods.
The procedure has a single parameter called k that refers to the number of groups that a given data sample is
to be split into. As such, the procedure is often called k-fold cross-validation. When a specific value for k is
chosen, it may be used in place of k in the reference to the model, such as k=10 becoming 10-fold cross-
validation.
Cross-validation is primarily used in applied machine learning to estimate the skill of a machine learning
model on unseen data. That is, to use a limited sample in order to estimate how the model is expected to
perform in general when used to make predictions on data not used during the training of the model.
It is a popular method because it is simple to understand and because it generally results in a less biased or
less optimistic estimate of the model skill than other methods, such as a simple train/test split.
A vector is a series of numbers, like a matrix with one column but multiple rows, that can often be represented
spatially. A feature is a numerical or symbolic property of an aspect of an object. A feature vector is a vector
containing multiple elements about an object. Putting feature vectors for objects together can make up a feature space.
The features may represent, as a whole, one mere pixel or an entire image. The granularity depends on what someone is
trying to learn or represent about the object. You could describe a 3-dimensional shape with a feature vector indicating its
height, width, depth, etc.
Gyan Ganga Institute of Technology and Sciences
Understanding Hypothesis
In most supervised machine learning algorithm, our main goal is to find out a possible
hypothesis from the hypothesis space that could possibly map out the inputs to the proper
outputs.
The following figure shows the common method to find out the possible hypothesis from the
Hypothesis space:
Hypothesis (h):
A hypothesis is a function that best describes the target in supervised machine learning. The
hypothesis that an algorithm would come up depends upon the data and also depends upon the
restrictions and bias that we have imposed on the data. To better understand the Hypothesis
Space and Hypothesis consider the following coordinate that shows the distribution of some data:
Gyan Ganga Institute of Technology and Sciences
Say suppose we have test data for which we have to determine the outputs or
results. The test data is as shown below:
he way in which the coordinate would be divided depends on the data, algorithm and constraints.
Gyan Ganga Institute of Technology and Sciences
All these legal possible ways in which we can divide the coordinate plane to predict the
outcome of the test data composes of the Hypothesis Space.
Each individual possible way is known as the hypothesis.
Hence, in this example the hypothesis space would be like: