MACHINE LEARNING
Learning is any process of improving performance from experience
Machine Learning: changes in a system that enable a system to do the same task more efficiently. (Herbert
Simon, 1983). System (machine) is said to learn from experience E with respect to some class of tasks T and
performance measure P, if its performance at tasks in T, as measured by P, improves with experience E.
(Mitchell 1997). Machine learning involves automatic procedures that learn a task from a series of examples.
The most convenient source of examples is data
A learnable system is
o More flexible – being able to respond to new problems and situations.
o Easier to program.
Designing a machine learning approach involves a number of design choices, including choosing the type of
training experience, the target function to be learned, a representation for this target function, and an algorithm
for learning the target function from training examples.
Machine Learning Process
The diagram below illustrates the machine learning process
Types of Learning
i). Supervised learning: learning takes place by providing data (observations) that are labeled with pre-
defined classes. Generally it is a learning situation in which both the inputs and outputs can be perceived.
It is like that a “teacher” gives the classes (supervision).
ii). Reinforcement learning: learning from feedback given at the end of a sequence of steps. Generally it is a
type of learning situation in which the agent does not know the outcomes but is given some form of
feedback on evaluating its action. It is however not told the correctness of its action
– Feedback is a positive or negative reward.
– This learning takes place where the agent cannot compare the results of its action to a desired result.
– The objective of this learning is to find a successful rule (function) for performing a task.
Example: The software may win or lose a game if it makes good or poor moves
iii).Unsupervised learning: - Unsupervised learning is a type of learning in which the no hint is given at all
about the correct input.
– The learning from input data without pre-defined classes i.e. the specific goal is not given.
– Learning without the help from a supervisor.
– It therefore develops clusters of the training records based on data similarities.
Learning Problem
Learning = Improving with experience at some task
Artificial Intelligence ~ Wainaina Page 1 of 5
• Improve over Task T
• with respect to performance measure P
• based on experience E
Example
A computer program that learns to play checkers might improve its performance as measured by its ability to
win at the class of tasks involving playing checkers games, through exprience obtained by playing games
against itself. In general, to a well-defined learning problem, we must identity these three features: the class of
tasks, the measure of performance to be improved, and the source of exprience.
Checkers learning problem
• T: Playing checkers
• P: Percentage of games won against an opponent out of the total number of games played
• E: Playing practice games against itself
In order to design such a system, the following must be considered: what exactly should be learned, how shall it
be represented and what specific algorithm to learn it
Paradigms of machine learning
A paradigms of machine learning refers to methodologies or algorithms of learning. Examples include:
1. Instance based learning (CBR, k-NN)
2. Induction
3. Clustering
4. Genetic algorithms / Evolutionary Strategies
5. Neural networks
6. Decision tree learning
7. Bayesian Networks
8. Support Vector Machines
9. Explanation Based Learning
Instance based learning: methods that uses existing examples to classify new examples by considering
similarity. They simply stores training data (or only minor processing) and waits until it is given a test
tuple. Generally, they do not build models explicitly, and classifying unknown records is relatively
expensive
Induction: learning from examples; this is a form of supervised or un-supervised learning uses specific
examples to reach general conclusions; Concepts are learned from sets of labelled instances.
Clustering: discovering similar group; Unsupervised, inductive learning in which natural classes are
found for data instances, as well ways of classifying them.
Artificial Neural networks (ANN)
This an artificial representation of the human brain by simulating its learning process. It is also called
‘neural network’. ANNs takes a vector of input values and produce a vector of output values as they
train weights of neurons inside them.
Evaluating learning methods (Paradigms)
Several possible criteria for evaluating a learning algorithm
i). Measure accuracy : The higher the number of correct classification, the more the accuracy
ii). Efficiency:
Artificial Intelligence ~ Wainaina Page 2 of 5
– Time taken to construct the model
– Time to use the model in processing data
– Memory space required by training data
iii).Robustness: ability to handling noise (incomplete, missing values etc)
iv). Compactness of the model: size of the tree, or the number of rules required for it to learn. Most common
criterion is predictive accuracy
Learning tasks
The following are examples of tasks: - Classification, Problem solving/planning, Control, Time series prediction
and Clustering
i) Classification task
This refers to assigning object/event to one of a given finite set of categories.
Application Examples:
– Classify symptoms to category of diseases
– Assign a credit transaction to a genuine or fraud category
– Assign an email to spam or genuine mail categories
Example of classification task
New data
Train set Test set
Loan
Learning system Model
Yes/No
ii) Problem Solving / Planning tasks
This refers to performing actions in an environment in order to achieve a goal.
Examples
– Solving calculus problems
– Playing checkers, chess, or backgammon
– Driving a car or a jeep
– Flying a plane, helicopter, or rocket
iii) Control task
This refers to managing or running an object in an environment so as to achieve a goal
Examples:
– Controlling an elevator
– Controlling an object in a video game
Artificial Intelligence ~ Wainaina Page 3 of 5
– Controlling a mobile robot
Requirements of a Learning System
Learning system specification of the following element
i). Training data: Specify the training experience
ii). Target function: specify exactly what is too be learned.
iii).Representation methodology : specify how to represent the target function
iv). Learning algorithm: identify learning algorithm (Learner) to infer the target function from the experience.
Machine learning situations
Machine 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 (dynamic environment) e.g. routing on a computer network
• Solution needs to be adapted to particular cases (user biometrics)
Motivations: Reasons for machine Learning
i). To automatically adapt and customize according to the needs of individual users.
e.g.
– Personalized news or mail filter
– Personalized tutoring
ii). To discover new knowledge from large databases (data mining).
e.g.
– Market basket analysis (e.g. diapers and beer)
– Medical text mining (e.g. migraines to calcium channel blockers to magnesium)
Areas of Influence for Machine Learning
The following disciplines contributes to machine learning
i). Statistics: Explains how best to use samples drawn from unknown probability distributions to help decide
from which distribution some new sample is drawn.
ii). Psychology: Explains How to model human performance on various learning tasks.
iii). Artificial Intelligence: the study of how to write algorithms that simulate human intelligence
iv). Evolutionary Models: discusses how to model certain aspects of biological evolution to improve the
performance of computer programs
Machine learning Applications
1. Machine perception:
This is the ability of computing machines to sense and interpret images, sounds, or other contents of their
environments, or of the contents of stored media.
This is used in industrial processes, such as assembly, inspection, diagnosis, vehicle guidance, etc.
2. Speech recognition:
Machine learning systems are used to learn to recognize speech.
3. Computer Vision: Computer vision systems that automatically classify microscope images of cells, are
developed using machine learning.
This is because the resulting systems are more accurate than hand-crafted programs.
Computer Vision example:
• US Post Office to automatically sort letters containing handwritten addresses.
• Over 85% of handwritten mail in the US is sorted automatically, using handwriting analysis software
trained to very high accuracy using machine learning over a very large data set.
4. Bio-surveillance: monitoring of biological changes or behaviours such as detecting or tracking disease
outbreaks.
Artificial Intelligence ~ Wainaina Page 4 of 5
• For example, the Real-time Outbreak and Disease Surveillance system (RODS) system is project
involving real-time collection of admissions reports to emergency rooms across in USA western
Pennsylvania,
• RODS use of machine learning software to learn the profile of typical admissions so that it can detect
anomalous patterns of symptoms and their geographical distribution.
5. Robot control:
Robot use machine learning to refine its ability to detect distant objects.
Challenges in Machine Learning
• Choosing algorithms for learning a concept/task
• Determining how much training data is sufficient to learn a concept with high confidence.
• Choosing appropriate training examples among many alternatives.
• Choosing the best tasks for a system to learn.
• Choosing the best way for a system to represent its knowledge.
Machine learning algorithms properties
1. Be able to generalize, but not too much i.e. over generalizing leads to inaccuracy
2. Be scalable and efficient: The technique should handle a huge amount of data and capable of process them
quickly.
3. Be explicative: The algorithm should provide explanation. E.g. medical diagnosis require accurate
explanation since the diagnosis may involve applying surgery to a patient
4. The technique should be determinist: if data does not change the learned model should always be the
same and the answer for a given test instance should be always the same. If data changes then the technique
should adapt to changes.
5. Robust: Ability to handle errors and noise (outliers, invalid data)
6. Be reliable: Be consistent in providing solutions
Artificial Intelligence ~ Wainaina Page 5 of 5