Documente Academic
Documente Profesional
Documente Cultură
1. Modified Weighted k-NNC assigns non-linear weight as e−d to a nearest neighbors of an unseen object (u),
where d is the distance from unseen object to the neighbor. Sorted distances from the unseen objects to its
neighbors (first to last) and their class labels are given. Identify the class label of the unseen object.
K-NN (u) = { x1C1 , x2C2 , x3C2 , x4C3 , x5C2 }. Superscript represents class label.
Distance vector from u to the neighbors = (1, 4, 5, 7, 10) [ 3]
2. A training dataset is given in Table 1 with two attributes X and Y, and two classes ” + “ and ”−′′ . Each
attribute can take values from {0, 1, 2}. Answer the following questions.
(a) Build a decision tree on the training dataset.
(b) The concept for “ + ” class is Y = 1 and the concept for ” − “ class is X = 0 ∨ X = 2. Does your
decision tree capture this concept.
(c) What are the accuracy, precision, recall and F1-measure of the decision tree on the training set.
(d) What are the accuracy, precision, recall and F1-measure of the decision tree on the training set if
following cost matrix is considered.
0 if i = j;
C (i, j) = 1 if i = +1, j = −1;
#” − “ instances
if i = −, j = +;
#” +′′ instances
[ 3 + 1 + 3 + 3]
3. Consider the dataset given in Table 1 and predict the class label of an unknown instance with X = 2, Y = 2.
using KNN classifier (K = 111). [ 4]
4. Consider the dataset given in Table 2 (overleaf) and predict the class label of an unknown object X =
(Yes, Single, Low) using Naive Bayes classifier. [ 5]
5. What is model over-fitting? How do you estimate generalization error of a decision tree? [ 4]
6. Apply Random Forest with T = 3. Each tree is built with one attribute, from a bootstrap sample with
number of instances 5. Identify the class label of X = (Yes, Single, Low) (Table 2) [ 4]
[ P.T.O]
2