# Homework-4 - x = 2 . 5 has index 2. Therefore, it is...

This preview shows pages 1–2. Sign up to view the full content.

Homework-4 Question 1 You are given the following training examples. Each has only one attribute, and the classiﬁcation is into positive/negative. index x classiﬁcation 1 1.0 + 2 2.0 - 3 4.0 + 4 5.0 + 5 6.0 - 6 7.0 - We would like to evaluate two learning algorithms that use a set S of training examples to classify the example with attribute value of x . Algorithm A Let S p ,S n be the sets of positive and negative examples in S . If S p is empty classify x as negative. If S n is empty classify x as positive. Otherwise, compute u p , the mean of the x values in S p , and u n , the mean of the x values in S n . If x value is closer to u p than it is to u n then classify x as positive. Otherwise classify x as negative. Example: Using all the training examples above we have: u p = 3 . 33, u n = 5. Therefore, an example with x = 2 . 5 is classiﬁed as positive. Algorithm B Find the example y with an attribute value nearest to x . Classify x with the same classiﬁcation as y . (If there are two examples nearest to x , one positive and the other negative, classify x as positive. Example: Using all the training examples above the nearest example to

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: x = 2 . 5 has index 2. Therefore, it is classiﬁed as negative. Part 1. Use leave-one-out (6-fold cross validation) to estimate the errors of Algorithm A and Algorithm B. Answer: e A = e B = Part 2. Use 3-fold cross validation to estimate the errors of Algorithm A and Algorithm B. Run cross-validation three times, on the following three permutations of the data: 1-(1 , 2 , 3 , 4 , 5 , 6) 2-(1 , 3 , 5 , 2 , 4 , 6) 3-(1 , 6 , 2 , 5 , 3 , 4) What are the computed errors in each case: Permutation 1: e A = e B = Permutation 2: e A = e B = Permutation 3: e A = e B = What are the estimates to the error and standard deviation for each algorithm: Algorithm A: e = σ = Algorithm B: e = σ = Question 2 Consider a classiﬁer h that is tested on 100 randomly chosen examples. It turns out that h misclassify 30 of them. Give an interval into which the true error of the classiﬁer will fall with approximately 95% probability?...
View Full Document

## This note was uploaded on 12/03/2009 for the course COMPUTER E 770 taught by Professor Dr.mohammednizari during the Spring '09 term at Jordan University of Science & Tech.

### Page1 / 2

Homework-4 - x = 2 . 5 has index 2. Therefore, it is...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online