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:
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
Related questions
Question
![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-](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F36a7a892-d2a2-4a6f-a8a2-55ad3cac8d8b%2F90ce2e57-8c0e-4d3e-8944-e827534a21bd%2F7rn5os_processed.png&w=3840&q=75)
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

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 8 steps

Recommended textbooks for you

Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated

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…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY

Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated

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…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY

Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,

