Professional Documents
Culture Documents
Ai CH4
Ai CH4
(ITec4151)
Chapter 4-
Learning
• Types of learning
• Learning approaches/methods
• Construct Model/Prototype
Complied by Wasyihun S.
(MSc.) 2014 2
Introduction
• One of the most important characteristics of human
beings is their capacity to learn as a human
intelligence .
• Our personality, our habits, skills, knowledge, attitude
and interest is largely the result of learning.
• These are important in helping the individual to adapt
to his environment.
Complied by Wasyihun S.
(MSc.) 2014 3
What learning is?
Learning is:
• Memorizing something
Complied by Wasyihun S.
(MSc.) 2014 4
Cont….
The idea behind learning is that percepts should not
only be used for acting now, but also for improving the
agent’s ability to act in the future.
– Learning is essential for unknown environments, i.e. when
the agent lacks knowledge.
– Learning modifies the agent's decision making mechanisms to
improve performance
Complied by Wasyihun S.
(MSc.) 2014 5
Types of Learning.
1. Supervised learning: occurs where a set of input/output
pairs are explicitly presented to the agent by a
learner.
• Is the learning process when the outcome variable is
known.
• The outcome datasets are used to train the machine and
get
the desired output.
– The learner provides a category label for each pattern
in a
training set, then the learning algorithm finds a rule that
Complied by Wasyihun S.
does a good job of predicting the output associated with6 a
(MSc.) 2014
An example: data (loan application)
Complied by Wasyihun S.
(MSc.) 2014 7
The Learning Process
• Learn a classification model from the data
• Use the model to classify future loan applications
into
– Yes (approved) and
– No (not approved)
• What is the class for following case/instance?
Complied by Wasyihun S.
(MSc.) 2014 8
applications
Complied by Wasyihun S.
(MSc.) 2014 9
2. Unsupervised learning: Learning when there is
no information about what the correct outputs
The class labels of training data is unknown.
are.
- A form of learning by observation rather than
learning by examples
- Clustering is a technique for finding similarity groups
in data.
Complied by Wasyihun S.
(MSc.) 2014 10
Cont…
• Thus Cluster Analysis
– Finding groups of objects such that the objects in a
group will be similar (or related) to one another and
different from (or unrelated to) the objects in
other groups
Inter-cluster
Intra-cluster distances
distances are are
minimized maximized
Complied by Wasyihun S.
(MSc.) 2014 11
3.Reinforcement Learning (RL): an agent interacting
with the world makes observations, takes actions, & is
rewarded or punished; it should learn to choose actions in
order to obtain a lot of reward.
– The agent is given an evaluation of its action, but not told the correct
action.
– If the responses is successful in action and satisfied
the needs, on the subsequent occasions the individual
will tend to repeat it.
More general than supervised/unsupervised learning
learn from interaction w/ environment to achieve a
goal. Complied by Wasyihun S.
(MSc.) 2014
2014 12
Data sets preparation for learning
• Training set
–Used in supervised learning, a training set is a set of
problem instances (described as a set of properties and their
values), together with a classification of the instance.
• Test set
– A set of instances used to test the accuracy of a learned
hypothesis.
– Training sets is used to build model and test sets is used to
determine the accuracy of the model.
– The test set is used to see how well it works for
classifying future or unknown objects
Complied by by
Complied Berhanu A. S.
Wasyihun
(MSc.) (MSc.)
20142014 13
How to Split Dataset into Training and Testing Sets?
Holdout Method
– Given data is randomly partitioned into
two independent sets
o Training set (2/3) for model construction
o Test set (1/3) for accuracy estimation
- If many (thousands) of examples are available, including several
hundred examples from each class.
Cross-Validation Method
-Randomly partition the data into k mutually exclusive
subsets, each approximately equal size.
-Where k = 10 is most popular.
- Complied by Wasyihun S.
(MSc.) 2014 14
• Learning—A Two-Step Process
• Model construction:
– A training set is used to create the model.
– The model is represented as classification rules
or mathematical formulae.
• Model usage:
– The test set is used to see how well it works
for classifying future or unknown objects
Complied by Wasyihun S.
(MSc.) 2014 15
Step 1: Model Construction
Classification
Algorithms
Trainin
g
Data
Classifier
model
Testin
g Unseen Data
Data
(Jeff, Professor, 4)
N A M E R ANK YEARS TENURED
Tom Assistant Prof 2 no Tenured?
M erlisa Associate Prof 7 no
G eorge Professor 5 yes
Joseph Assistant Prof Complied by Wasyihun
7lied byBerhanu yAe.(sS.
Comp MSc.) 17
(MSc.)
20142014
Metrics for Performance Evaluation…
PREDICTED CLASS
Class=Yes Class=No
Class=Yes a b
(TP) (FN)
ACTUA
L Class=No c d
CLASS (FP) (TN)
Complied by by
Complied Berhanu A. S.
Wasyihun
(MSc.) (MSc.)
20142014 18
Confusion Matrix
• A confusion matrix is useful tool for analyzing how well your
classifier can recognize tuples of different classes
Complied by by
Complied Berhanu A. S.
Wasyihun
(MSc.) (MSc.)
20142014 20
Classifier performance Measure Examples
Compute the following performance measures from the
confusion matrix given below.
Classes Yes NO
- Sensitivity, Specificity, Accuracy, Recall and Precision
Yes 90 210
NO 140 9560
Accuracy =(TP + TN)/(P+N) = 9650/10,000 = 96.50%
Error Rate= 1-Accuracy= 1- 0.965= 3.5%
Precision = TP/(TP+FP) = TP/N = 90/230 = 39.13%
Recall = TP/TP+FN= TP/P =90/90+210= 30%
Interpretability
- understanding and insight provided by the model
Complied by Wasyihun S.
(MSc.) 2014 22
Purpose of Evaluation
• The objective of learning classifications from sample
data is to classify and predict successfully on new data
Complied by Wasyihun S.
(MSc.) 2014 23
Home work
1. What is learning? List types of learning?
Complied by Wasyihun S.
(MSc.) 2014 25
Reading Assignment
• Deep Learning
• How the human brain works?
• How Neural network works??????
• What is Back Propagation Algorithm?
ANN?
• Describe the algorithm?
• How does it work?
Complied by Wasyihun S.
(MSc.) 2014 26
Thank you
Complied by Wasyihun S.
(MSc.) 2014 27