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:

Glencoe Algebra 1, Student Edition, 9780079039897, 0079039898, 2018
18th Edition
ISBN:9780079039897
Author:Carter
Publisher:Carter
Chapter10: Statistics
Section10.6: Summarizing Categorical Data
Problem 28PPS
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
Recommended textbooks for you
Glencoe Algebra 1, Student Edition, 9780079039897…
Glencoe Algebra 1, Student Edition, 9780079039897…
Algebra
ISBN:
9780079039897
Author:
Carter
Publisher:
McGraw Hill
Big Ideas Math A Bridge To Success Algebra 1: Stu…
Big Ideas Math A Bridge To Success Algebra 1: Stu…
Algebra
ISBN:
9781680331141
Author:
HOUGHTON MIFFLIN HARCOURT
Publisher:
Houghton Mifflin Harcourt
College Algebra
College Algebra
Algebra
ISBN:
9781938168383
Author:
Jay Abramson
Publisher:
OpenStax