Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 4 (12pt) A probability distribution on the real line is a mix- ture of two classes +1 and -1, the first one is the
Problem 4 (12pt) A probability distribution on the real line is a mix- ture of two classes +1 and -1, the first one is the uniform distribution on the interval [0, 4) (the probability density is the same at every point of [0, 4]), thesecond is a normal distribution N(3, 1), with prior probabilities (probability of each class) 0.3 and 0.7 respectively. (a) What it is the Bayes optimal classifier f* ? (b) What it is the regression function? (c) Compute the classification loss of f* (the Bayes risk). (d) Compute the classification loss of 1-NN classifier. Compare it to the loss of f*. (e) Sample 100 points from the distribution and compute the loss of f* experimentally. Now repeat with 10000 points. How much does the test loss differ from what you computed in (c) and what would you expect? (f) Same as (e) for 1-NN and 3-NN (use a separate sample of 1000 points as training data). You can use a k-NN implementation in Matlab or, if you prefer, implement it yourself (in that case show code)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started