Question

In: Computer Science

Problem 4 (20 pt.) Given the following dataset: ? ? ? Class 2.5 1.5 3.5 -...

Problem 4 (20 pt.)
Given the following dataset:

?

?

?

Class

2.5

1.5

3.5

-

0.5

1.0

1.5

+

0.5

0.5

1.0

+

2.0

2.5

2.5

+

1.0

2.0

3.0

-

2.0

3.0

1.5

-

Supposethatyouwanttoclassifyanobservation?=(?.?, ?.?, ?.?)using?-NearestNeighbors with Euclidean distance as the proximity metric. Answer the following questions:

  1. (8 pts.) What is the distance between ? and every observation in the dataset?

  2. (3 pts.) What is the predicted class label for ? if ? = ??

  3. (3 pts.) What is the predicted class label for ? if ? = ??

  4. (3 pts.) What is the predicted class label for ? if ? = ??

  5. (3 pts.) What is the predicted class label for ? if ? = ??

Solutions

Expert Solution

1) Distance Between z and every observation in dataset:

(i) Point 1:

(ii) Point 2:

(iii) Point 3:

(iv) Point 4:

(v) Point 5:

(vi) Point 6:

2) For K = 1, closest point is V. So the predicted class label for z is '-'

3) For K = 2, closest points are IV and V, both has different class label. So the predicted class label for z is '-'

4) For K = 3, closest points are I, IV and V, most occuring label is '-'. So the predicted class label for z is '-'

5) For K = 4, closest points are I, IV, V, and VI, most occuring label is '-'. So the predicted class label for z is '-'

For question 3, it depends on implementation whether result will be '+' or '-'.


Related Solutions

Consider the following. x 1 2.5 3 4 5 1.5 y 1.5 2.2 3.5 3 4...
Consider the following. x 1 2.5 3 4 5 1.5 y 1.5 2.2 3.5 3 4 2.5 (a) Draw a scatter diagram for the following data. (Do this on paper. Your instructor may ask you to turn in this work.) (b) Would you be justified in using the techniques of linear regression on these data to find the line of best fit? Explain
Consider the following hypothetical dataset regarding the compression strength of a concrete slab (ksi): 2.5, 3.5,...
Consider the following hypothetical dataset regarding the compression strength of a concrete slab (ksi): 2.5, 3.5, 2.2, 3.2, 2.9, 4.3, 3.7, 3.4, 3.1, 2.8, 1.9, and 2.1. (a) Compute the mean and standard deviation of the above data set (b) Compute the 25th, 50th, 75th and 90th percentile values of the compressive strength from the above dataset (c) Construct a boxplot for the above data set (d) Check if the largest value is an outlier following the z-score approach
Consider the following term structure: Term Yield 1 1.5% 2 2.3% 3 3.5% 4 3.7% Compute...
Consider the following term structure: Term Yield 1 1.5% 2 2.3% 3 3.5% 4 3.7% Compute the implied forward rate on a one-year security 1 year from now and 2 years from now. What is the economic interpretation of these rates according to the pure expectations theory? …according to the liquidity preference (modified expectations) theory? Suppose that you believe that the actual future one-year rates will be greater than the implied forward rates. How would you alter your desired borrowing...
Single data values (in hours): 3, 1, 4, 5, 5, 2, 2.5, 3.5, 4, 4.5, 0,...
Single data values (in hours): 3, 1, 4, 5, 5, 2, 2.5, 3.5, 4, 4.5, 0, 2, 2, 2.5, 3.5, 4, 4, 4, 4, 2, 3.5, 3.5, 2, 3, 4, 4, 3, 3, 3, 1 Claim: It was found that the mean time spent watching TV daily was 4 hours. A researcher claims that he believes the mean time spent watching TV is truly lower. The mean time spent watching TV daily is less than 4 hours.                                                                                          Null Hypothesis:...
QSO 320 Problem Set (Problem Set 4-20) Complete problem 4-20 at the end of Chapter 4...
QSO 320 Problem Set (Problem Set 4-20) Complete problem 4-20 at the end of Chapter 4 in your textbook. You will demonstrate your work using Excel templates provided. You do not need to include a graphical procedure. Problem 4-20 X Y Profit $4 $5 =SUMPRODUCT(B5:C5,$B$4:$C$4) Constraints Labor 1 2 =SUMPRODUCT(B7:C7,$B$4:$C$4) <= 10 Material 6 6 =SUMPRODUCT(B8:C8,$B$4:$C$4) <= 36 Storage 8 4 =SUMPRODUCT(B9:C9,$B$4:$C$4) <= 40 LHS Sign RHS Hi All, The homework problem does not seem straight forward, so I put...
Which of the following pairs of coordination complexes are linkage isomers? a.[Pt(Cl)2(SCN)4]4− and [Pt(Cl)2(NCS)4]4− b.[Pt(Cl)2(SCN)4]4− and...
Which of the following pairs of coordination complexes are linkage isomers? a.[Pt(Cl)2(SCN)4]4− and [Pt(Cl)2(NCS)4]4− b.[Pt(Cl)2(SCN)4]4− and [Pt(Cl)4(SCN)2]4− c.K4[Pt(Cl)2(SCN)4] and Na4[Pt(Cl)2(SCN)4]
4-2.5 In a class of 50 students, the result of a particular examination is a true...
4-2.5 In a class of 50 students, the result of a particular examination is a true mean of 70 and a true variance of 12. It is desired to estimate the mean by sampling, without replacement, a subset of the scores. a) Find the standard deviation of the sample mean if only 10 scores are used. b) How large should the sample size be for the standard deviation of the sample mean to be one percentage point (out of 100)?...
Given the following information and assuming a 20% CCA class, what is the NPV for this...
Given the following information and assuming a 20% CCA class, what is the NPV for this project? Initial investment in fixed assets = $800,000; initial investment in net working capital = $200,000; life = four years; after-tax cost savings = $250,000 per year; salvage value = $30,000; tax rate = 35%; discount rate = 16%.
Given the following information and assuming a 20% CCA class, what is the NPV for this...
Given the following information and assuming a 20% CCA class, what is the NPV for this project? Initial investment in fixed assets = $800,000; initial investment in net working capital = $200,000; life = four years; after-tax cost savings = $250,000 per year; salvage value = $30,000; tax rate = 35%; discount rate = 16%
Given the following dataset x   1   1   2   3   4   5 y   0   2   4   5  ...
Given the following dataset x   1   1   2   3   4   5 y   0   2   4   5   5   3 We want to test the claim that there is a correlation between xand y. The level of cretaine phosphokinase (CPK) in blood samples measures the amount of muscle damage for athletes. At Jock State University, the level of CPK was determined for each of 25 football players and 15 soccer players before and after practice. The two groups of athletes are trained...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT