Supervised Learning: Adane Letta Mamuye (PHD)
Supervised Learning: Adane Letta Mamuye (PHD)
Supervised Learning: Adane Letta Mamuye (PHD)
May 2019
Outline
• Classification-Introduction
• Decision tree classification
• Tree induction
• Decision tree practical issues
Classification
• Classification is the task of assigning objects to one of several
predefined categories.
• Given a collection of records (training set):
– Each record contains a set of attributes, one of the attributes is
the class.
• Find a model for class attribute as a function of the values of
other attributes.
• Goal: previously unseen records should be assigned a class as
accurately as possible.
• A test set is used to determine the accuracy of the model.
Classification Tasks
Image Classification Example
• Optical character recognition:- recognize characters sets from
their images. In this case there are multiple classes , as many
as there are characters we would like to recognize. Especially
interesting is the case when the characters are hand written:
There could be more than one tree How a decision tree used for
for the same data classification
• Each leaf in the case of classification is the class code and in regression
is a numeric value.
Building a Decision Tree
– Tree Construction: determine the best split to find out all the
branches and the leaf nodes of the tree.
• Avoiding overfitting :
– Prune the tree: leaf nodes (sub-trees) are removed from
the tree as long as the pruned tree performs better on the
test data than the larger tree.
Issues in decision trees
• Underfitting refers to a model that can neither model the
training data nor generalize to new data.
• Inexpensive to construct
• Extremely fast at classifying unknown records
• Easy to interpret for small-sized trees:- can be converted to if-
then rules that is easily understandable
• Accuracy is comparable to other classification techniques for
many simple data sets
Decision Tree Classifier Disadvantages
• Prone to overfitting.
• Require some kind of measurement as to how well they are
doing.
• Need to be careful with parameter tuning.
• Can create biased learned trees if some classes dominate.
Neural Network
• An ANN is just a parallel computational system consisting of
many simple processing elements connected together in a
specific way.
• The weighted outputs of these units are fed into hidden layer.
• INPUT VECTOR:- X = {x1, x2, … , xn} where n is the number of (non class)
attributes.
• INPUT LAYER:- there are as many nodes as non- class attributes i.e. as
the length of the input vector.
• HIDDEN LAYER:- the number of nodes in the hidden layer and the
number of hidden layers depends on implementation.
• In the out put layer there are as many nodes as classes (values
of the class attribute).
• Next, the net input and output of each unit in the hidden and
output layers are computed.
• Each unit in the hidden and output layers takes its net input and
then applies an activation function to it
– The logistic, or sigmoid, function is used.
Steps in Back Propagation Algorithm
• STEP THREE: back propagate the error.
• The error is propagated backward by updating the weights
and biases to reflect the error of the network’s prediction.
• For a j unit in the output layer, the error Errj is computed:
Steps in Back Propagation Algorithm
• FOUR:
• The weights and biases are updated to reflect the propagated
errors