Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How could I solve ?? and TODO: fill in part?? 2.b Compute expected loss function with respect to posterior distribution Given that the test returned

How could I solve "??" and "TODO: fill in" part??

image text in transcribed
2.b Compute expected loss function with respect to posterior distribution Given that the test returned a positive result (that D = 1), you can make one of two posible decisions: . T = 1: start the treatment . T = 0: do not start the treatment despite the positive test result Similarly to Question 1, let's assume that we estimate the cost of not treating a truly sick patient to be k times larger than the cost of treating a patient that is not truly sick. Recall from lecture that a loss function takes in a hidden state of the world 0 On this case, that's the reality R: whether or not the patient is sick), and a decision 6 an this case, that's T: whether or not to treat). Our loss function has the formula: f(R=0,T=1)=1 f(R=1,T=0)=k f(R=0,T=0)=zf'(R=1,T=1)=0 Compute the expected loss for each treatment decision, given that someone tested positive: IE[I(R, T = 0)|D = 1] =? IE[I(R, T = 1)|D = 1] =? Hint: Think carefully about what is random here. What's it's distribution? n [ ]: # TODO: complete the function def compute_expected_loss(treatment, posterior_probability, factor_k): Compute the expected loss for the treatment. Inputs: treatment: int 0/1 (Ono treatment, ltreatment) posterior_probability: float, probability that the patient is truly sick given positive test result k_factor : float, quantifies the ratio of the negative consequences of false negatives compared to false positives expected_loss = # TODD: fill in return ( expected_loss)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elementary Differential Equations

Authors: William E Boyce, Richard C DiPrima, Douglas B Meade

11th Edition

1119169879, 9781119169871

More Books

Students also viewed these Mathematics questions

Question

1. Can they separate relevant from irrelevant information?

Answered: 1 week ago

Question

7- Identify the surface that given by (sm2 (0) + cos2(0)) z

Answered: 1 week ago

Question

What is a process and process table?

Answered: 1 week ago

Question

What is Industrial Economics and Theory of Firm?

Answered: 1 week ago

Question

What is the meaning and definition of E-Business?

Answered: 1 week ago