Unit IV
Unit IV
Object Segmentation
Supervised and Unsupervised Learning
Regression Vs Segmentation
Regression and classification are supervised learning approach that
maps an input to an output based on example input-output pairs,
while clustering is a unsupervised learning approach.
• Regression: It predicts continuous values and their output.
Regression analysis is the statistical model that is used to
predict the numeric data instead of labels. It can also identify
the distribution trends based on the available data or historic
data. Predicting a person's income based on various attributes
such as age and experience is an example of creating a
regression model.
• Classification: It predicts discrete number of values. In
classification the data is categorized under different labels
according to some parameters and then the labels are predicted
for the data. Classifying emails as either spam or not spam is
example of classification problem.
• Clustering: Clustering is grouping up of data
according to the similarity of data points and
data patterns. The aim of this is to separate
similar categories of data and differentiate
them into localized regions. This way, when a
new data point arrives, we can easily identify
which group or cluster it belongs to. This is
done for unstructured datasets where it is up
to the machine to figure out the categories.
Basic Decision Tree Concept
• A Decision Tree is an important data structure known to solve many
computational problems
Binary Decision Tree
A B C f
0 0 0 m0
0 0 1 m1
0 1 0 m2
0 1 1 m3
1 0 0 m4
1 0 1 m5
1 1 0 m6
1 1 1 m7
Basic Concept
• Such a classification is, in fact, made by posing questions starting from the
root node to each terminal node.
Decision Tree and Classification Task
• The series of questions and their answers can be organized in the form of a
decision tree
– As a hierarchical structure consisting of nodes and edges
x2 a
Region3
x1 a
x1
X1<x1a x1>x1a
X2<x2a x2>x2a
Why Trees?
What would you do tonight? Decide amongst the
following:
• Finish homework
• Go to a party
• Read a book
• Hang out with friends
Homework Deadline
tonight?
Yes
No
No Yes
y=2.2
y=3.2
Region3
y=5.6
x1
Finding the sub-regions
The regions could have any shape.
But we choose just rectangles
x2 Region2
x2 Region2 Region1
Region1
y=2.2
Y=2.5
Y=2.9 Y=3.2
Region3
Region3
Y=5.1y=5.6
x1
x1
Find boxes R1, . . . , RJ that minimize the RSS
Ideas?
How?
It turns out that as we increase α from zero in, branches get pruned
from the tree in a nested and predictable fashion, so obtaining the
whole sequence of subtrees as a function of α is easy.
ALGORITHM FOR PRUNING