Unit 4
MACHINE LEARNING
What Is 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.
Definition of learning
A computer program is said to learn from experience E with respect to some class of tasks T and
performance measure P, if its performance at tasks T, as measured by P, improves with
experience E.
A computer program which learns from experience is called a machine learning program or
simply a learning program. Such a program is sometimes also referred to as a learner.
Examples
i) Handwriting recognition learning problem
• Task T: Recognising and classifying handwritten words within images
• Performance P: Percent of words correctly classified
• Training experience E: A dataset of handwritten words with given classifications
ii) A robot driving learning problem
• Task T: Driving on highways using vision sensors
• Performance measure P: Average distance travelled before an error
• training experience: A sequence of images and steering commands recorded while observing a
human driver
Components of Learning
Basic components of learning process The learning process, whether by a human or a machine,
can be divided into four components, namely, data storage, abstraction, generalization and
evaluation.
Data storage
Facilities for storing and retrieving huge amounts of data are an important component of the
learning process. Humans and computers alike utilize data storage as a foundation for advanced
reasoning.
In a human being, the data is stored in the brain and data is retrieved using electrochemical
signals.
Computers use hard disk drives, flash memory, random access memory and similar devices to
store data and use cables and other technology to retrieve data.
Abstraction
The second component of the learning process is known as abstraction.
Abstraction is the process of extracting knowledge about stored data. This involves creating
general concepts about the data as a whole. The creation of knowledge involves application of
known models and creation of new models.
The process of fitting a model to a dataset is known as training. When the model has been
trained, the data is transformed into an abstract form that summarizes the original information.
Generalization
The third component of the learning process is known as generalisation.
The term generalization describes the process of turning the knowledge about stored data into a
form that can be utilized for future action. These actions are to be carried out on tasks that are
similar, but
not identical, to those what have been seen before. In generalization, the goal is to discover
those
properties of the data that will be most relevant to future tasks.
Evaluation
Evaluation is the last component of the learning process.
It is the process of giving feedback to the user to measure the utility of the learned knowledge.
This feedback is then utilised to effect improvements in the whole learning process.
Learning Models
Machine learning is concerned with using the right features to build the right models that
achieve the right tasks. The basic idea of Learning models has divided into three categories.
For a given problem, the collection of all possible outcomes represents the sample space or
instance space.
Using a Logical expression. (Logical models)
Using the Geometry of the instance space. (Geometric models)
Using Probability to classify the instance space. (Probabilistic models)
Grouping and Grading
Logical models
Logical models use a logical expression to divide the instance space into segments and hence
construct grouping models. A logical expression is an expression that returns a Boolean value, i.e., a
True or False outcome. Once the data is grouped using a logical expression, the data is divided into
homogeneous groupings for the problem we are trying to solve.
For example, for a classification problem, all the instances in the group belong to one class.
There are mainly two kinds of logical models:
Tree models and
Rule models.
Rule models consist of a collection of implications or IF-THEN rules.
For tree-based models, the ‘if-part’ defines a segment and the ‘then-part’ defines the behaviour of the model for this segment.
Rule models follow the same reasoning.
Logical models and Concept learning
Concept Learning is “The inferring of a Boolean-valued function from training examples of its
input and output.
Geometric models
Features could be described as points in two dimensions (x- and y-axis) or a three-dimensional
space (x, y, and z). Even when features are not intrinsically geometric, they could be modelled in
a geometric manner (for example, temperature as a function of time can be modelled in two
axes). In geometric models, there are two ways we could impose similarity.
We could use geometric concepts like lines or planes to segment (classify) the instance space.
These are called Linear models. Eg : Regression
Alternatively, we can use the geometric notion of distance to represent similarity. In this case,
if two points are close together, they have similar values for features and thus can be classed as
similar. We call such models as Distance-based models. The distance metrics commonly used are
Euclidean, Minkowski, Manhattan, and Mahalanobis. Eg: nearest-neighbour, K-means clustering
a
Probabilistic models
Probabilistic models see features and target variables as random variables. The process of
modelling represents and manipulates the level of uncertainty with respect to these variables.
There are two types of probabilistic models:
Predictive and
Generative.
Predictive probability models use the idea of a conditional probability distribution P (Y |X) from
which Y can be predicted from X.
Generative models estimate the joint distribution P (Y, X).
Naïve Bayes is an example of a probabilistic classifier.
Grouping and Grading
Grading vs grouping is an orthogonal categorization to geometric-probabilistic-logical-
compositional.
Grouping models break the instance space up into groups or segments and in each segment
apply a very simple method (such as majority class).
o E.g. decision tree, KNN.
Grading models form one global model over the instance space.
o E.g. Linear classifiers – Neural networks
Designing a Learning System
For any learning system, we must be knowing the three elements — T (Task), P (Performance
Measure), and E (Training Experience).
Types of Learning
In general, machine learning algorithms can be classified into three types.
• Supervised learning
• Unsupervised learning
• Reinforcement learning
Supervised learning
A training set of examples with the correct responses (targets) is provided and, based on this
training set, the algorithm generalises to respond correctly to all possible inputs. This is also
called learning from exemplars. Supervised learning is the machine learning task of learning a
function that maps an input to an output based on example input-output pairs.
Example supervised learning
Consider the following data regarding patients entering a clinic. The data consists of the gender
and age of the patients and each patient is labeled as “healthy” or “sick”.
Unsupervised learning
Unsupervised learning is a type of machine learning algorithm used to draw inferences from
datasets consisting of input data without labeled responses. In unsupervised learning
algorithms, a classification or categorization is not included in the observations. There are no
output values and so there is no estimation of functions.
Consider the following data regarding patients entering a clinic. The data consists of the gender
and age of the patients.
Reinforcement learning
This is somewhere between supervised and unsupervised learning.
Reinforcement learning is the problem of getting an agent to act in the world so as to maximize
its rewards.
The algorithm gets told when the answer is wrong, but does not get told how to correct it. It has
to explore and try out different possibilities until it works out how to get the answer right.
Reinforcement learning is sometime called learning with a critic because of this monitor that
scores the answer, but does not suggest improvements.
MODEL INFORMATION
COMPLETE INCOMPLETE
Bayes Decision Supervised Unsupervised
Theory Learning Learning
Parametric Nonparametric Parametric Nonparametric
Approach Approach Approach Approach
“Optimal” Plug-in Density Geometric Rules Mixture Cluster Analysis
Rules Rules Estimation (K-NN, MLP) Resolving (Hard, Fuzzy)