Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Machine Learning Assignment: Classification with Different Techniques and Subsets, Exercises of Computer Science

A machine learning assignment with various problems related to classification using different techniques such as nearest neighbor classifier (nnc), adaboost, and centroid method. The assignment includes finding the class assigned by nnc for different subsets of training data and using stacking to combine the predictions of multiple hypotheses.

Typology: Exercises

2012/2013

Uploaded on 03/28/2013

ekanath
ekanath 🇮🇳

3.8

(4)

80 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Assignment
1. Consider the following two-dimensional training data corresponding to
a two-class problem:
X1 = (0.5, 1,X)t; X2 = ((1, 1,X)t; X3 = (0.5, 0.5,X)t; X4 = (1, 0.5,X)t;
X5 = (2, 2.5,X)t; X6 = (2, 2,X)2; X7 = (4, 1.25,O)t; X8 = (5, 1.25,O)t;
X9 = (4, 0.5,O)t; X10 = (5, 0.5,O)t;
If different classifiers are formed using different subsets of the training
set,for the test pattern P = (3, 2)t, what is the class assigned by NNC
if either or both training patterns X5 and X6 are in the subset. What
happens if majority of the subsets (classifiers) do not have both X5 and
X6?
2. Consider the following training set :
X1 = (1, 1,X)t; X2 = (2, 1,X)t; X3 = (3.3, 1,X)t; X4 = (1, 2,X)t;
X5 = (2, 2,X)t; X6 = (5, 1,O)t; X7 = (6, 1,O)t; X8 = (5, 2,O)t;
X9 = (6, 2,O)t; X10 = (5, 3,O)t
We have the disjoint subsets, S1 = {1,2}, S2 = {4,5}, S3 = {3}, S4 =
{6,7}, S5 = {8,10}, S6 = {9}.
Consider classifiers obtained by leaving out (a) S1 and S4, (b) S1 and
S5, and (c) S1 and S6. What is the class label assigned to the test
pattern (4,2) if NNC is used as the classifier in all the three cases?
3. Consider the data provided in problem 2. How do you learn the
AdaBoost classifier using the following weak learners in that order?
Classifier1: if x < 3 then class X, else O
Classifier2: if x >5 then class X, else O
Classifier3: if x + y · 3.5 then class X, else O.
How do you classify the test pattern (4,2) using the AdaBoost classifier?
4. Consider the dataset given in problem 2 and the test pattern P =
(4, 2). Classifier 1 : This method finds the centroid of the two classes.
The distance from the test pattern P is found from the two centroids.
Let this be d(P,C1) and d(P,C2). Then the probability that P belongs
to class 1 will be
Docsity.com
pf2

Partial preview of the text

Download Machine Learning Assignment: Classification with Different Techniques and Subsets and more Exercises Computer Science in PDF only on Docsity!

Assignment

  1. Consider the following two-dimensional training data corresponding to a two-class problem: X 1 = (0.5, 1,X) t ; X 2 = ((1, 1,X) t ; X 3 = (0.5, 0.5,X) t ; X 4 = (1, 0.5,X) t ; X 5 = (2, 2.5,X) t ; X 6 = (2, 2,X) 2 ; X 7 = (4, 1.25,O) t ; X 8 = (5, 1.25,O) t ; X 9 = (4, 0.5,O) t ; X 10 = (5, 0.5,O) t ; If different classifiers are formed using different subsets of the training set,for the test pattern P = (3, 2)t, what is the class assigned by NNC if either or both training patterns X 5 and X 6 are in the subset. What happens if majority of the subsets (classifiers) do not have both X 5 and X 6?
  2. Consider the following training set :

X 1 = (1, 1,X) t ; X 2 = (2, 1,X) t ; X 3 = (3.3, 1,X) t ; X 4 = (1, 2,X) t ;

X 5 = (2, 2,X) t ; X 6 = (5, 1,O) t ; X 7 = (6, 1,O) t ; X 8 = (5, 2,O) t ;

X 9 = (6, 2,O) t ; X 10 = (5, 3,O) t

We have the disjoint subsets, S 1 = {1,2}, S 2 = {4,5}, S 3 = {3}, S 4 = {6,7}, S 5 = {8,10}, S 6 = {9}. Consider classifiers obtained by leaving out (a) S 1 and S 4 , (b) S 1 and S 5 , and (c) S 1 and S 6. What is the class label assigned to the test pattern (4,2) if NNC is used as the classifier in all the three cases?

  1. Consider the data provided in problem 2. How do you learn the AdaBoost classifier using the following weak learners in that order? Classifier1: if x < 3 then class X, else O Classifier2: if x >5 then class X, else O Classifier3: if x + y · 3.5 then class X , else O. How do you classify the test pattern (4,2) using the AdaBoost classifier?
  2. Consider the dataset given in problem 2 and the test pattern P = (4, 2). Classifier 1 : This method finds the centroid of the two classes. The distance from the test pattern P is found from the two centroids. Let this be d ( P,C 1 ) and d ( P,C 2 ). Then the probability that P belongs to class 1 will be

Docsity.com

Similarly, Classifier 2: If three closest neighbours of P is taken, it will be 3,6 and 8. Then Combine these probabilities to assign a label to the test pattern P.

  1. Consider the dataset given in problem 2. Let h 1 be the hypothesis that

if x < 3, the pattern belongs to Class ’X’ and the pattern belongs to

Class ’O’ otherwise. Let the second hypothesis h 2 be that if x 1 · 5,

the pattern belongs to Class ’X’ and the pattern belongs to Class ’O’

otherwise. Let the prior probabilities P ( h 1 ) and P( h 2 ) be 0.5 each. Compute the posterior probabilities.

  1. Consider dataset given in problem 2. Let us consider different hypoth- esis for classification using this data. Let h 1 be according to the nearest neighbour. Let h 2 be according the majority vote for the closest three neighbours. Let h 3 be the classification according to the closest neigh- bour in the x direction. Let h 4 be the classification according to the nearest centroid. How do you use stacking based on these 4 hypotheses to classify (4,2)?

Docsity.com