Suppose you are rating apples for quality, to ensure the restaurants you serve get the highest quality apples. The ratings are {1,2,3}, where 1 means bad, 2 is ok and 3 is excellent. But, you want to err on the side of giving lower ratings: you prefer to label an apple as bad if you are not sure, to avoid your customers being dissatisfied with the apples. Better to be cautious, and miss some good apples, than to sell low quality apples. You decide to encode this into the cost function. Your cost is as follows lâŷ – yl ŷ Y cost (ŷ, y) = (1) This cost is twice as high when your prediction for quality ŷ is greater than the actual quality y. The cost is zero when ŷ = y. To make your predictions, you get access to a vector of attributes (features) x describing the apple. Assume you have access to the true distribution p(y|x). You want to reason about (a) the optimal predictor, for each x. Assume you are given a feature vector x. Define c(ŷ) = E[cost(ŷ, Y)|X = x] %3D Let pi = p(y= 1|x), p2 = p(y = 2|x) and p3 = p(y = 3|x). Write down c(ŷ) for each ŷ E {1,2, 3}, in terms of pi: P2: P3:

Advanced Engineering Mathematics
10th Edition
ISBN:9780470458365
Author:Erwin Kreyszig
Publisher:Erwin Kreyszig
Chapter2: Second-order Linear Odes
Section: Chapter Questions
Problem 1RQ
icon
Related questions
Question
100%
Suppose you are rating apples for quality, to ensure the restaurants you serve get the highest quality
apples. The ratings are {1,2,3}, where 1 means bad, 2 is ok and 3 is excellent. But, you want to
err on the side of giving lower ratings: you prefer to label an apple as bad if you are not sure, to
avoid your customers being dissatisfied with the apples. Better to be cautious, and miss some good
apples, than to sell low quality apples.
You decide to encode this into the cost function. Your cost is as follows
lâŷ – yl ŷ <y
| 2]ŷ – y| ŷ > Y
cost (ŷ, y)
(1)
This cost is twice as high when your prediction for quality ŷ is greater than the actual quality y.
The cost is zero when ŷ = y. To make your predictions, you get access to a vector of attributes
(features) x describing the apple.
(a)
Assume you have access to the true distribution p(y/x). You want to reason about
the optimal predictor, for each x. Assume you are given a feature vector x. Define
c(j) = E[cost (ŷ, Y)|X = x]
Let pi = p(y = 1|x), p2 = p(y = 2|x) and p3 = p(y = 3|x). Write down c(ŷ) for each ŷ € {1,2, 3} ,
in terms of p1, P2; P3-
Transcribed Image Text:Suppose you are rating apples for quality, to ensure the restaurants you serve get the highest quality apples. The ratings are {1,2,3}, where 1 means bad, 2 is ok and 3 is excellent. But, you want to err on the side of giving lower ratings: you prefer to label an apple as bad if you are not sure, to avoid your customers being dissatisfied with the apples. Better to be cautious, and miss some good apples, than to sell low quality apples. You decide to encode this into the cost function. Your cost is as follows lâŷ – yl ŷ <y | 2]ŷ – y| ŷ > Y cost (ŷ, y) (1) This cost is twice as high when your prediction for quality ŷ is greater than the actual quality y. The cost is zero when ŷ = y. To make your predictions, you get access to a vector of attributes (features) x describing the apple. (a) Assume you have access to the true distribution p(y/x). You want to reason about the optimal predictor, for each x. Assume you are given a feature vector x. Define c(j) = E[cost (ŷ, Y)|X = x] Let pi = p(y = 1|x), p2 = p(y = 2|x) and p3 = p(y = 3|x). Write down c(ŷ) for each ŷ € {1,2, 3} , in terms of p1, P2; P3-
Expert Solution
steps

Step by step

Solved in 8 steps

Blurred answer
Similar questions
Recommended textbooks for you
Advanced Engineering Mathematics
Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated
Numerical Methods for Engineers
Numerical Methods for Engineers
Advanced Math
ISBN:
9780073397924
Author:
Steven C. Chapra Dr., Raymond P. Canale
Publisher:
McGraw-Hill Education
Introductory Mathematics for Engineering Applicat…
Introductory Mathematics for Engineering Applicat…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY
Mathematics For Machine Technology
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,
Basic Technical Mathematics
Basic Technical Mathematics
Advanced Math
ISBN:
9780134437705
Author:
Washington
Publisher:
PEARSON
Topology
Topology
Advanced Math
ISBN:
9780134689517
Author:
Munkres, James R.
Publisher:
Pearson,