Professor John Doe has developed a novel classification algorithm (model) for diagnosing early onset of lung...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Professor John Doe has developed a novel classification algorithm (model) for diagnosing early onset of lung cancer. Dr. Doe has collected data from 1000 participants with half of them diagnosed with lung cancer and half of them do not have lung cancer. To test the effectiveness of his algorithm he has two sets of data: A vector named y_original that has values of 0's and 1's where 0 means "does not have lung cancer" and 1 means "has lung cancer". These are values with correct outcomes for the 1000 patients. b. A vector of data named y_predicted. Using his prediction model, he has generated the y_predicted vector of 1000 values that also contain 0's and 1's. These are the predicted outcomes of the same 1000 patients. a. Dr. Doe is interested in knowing if his prediction model is comparable to the existing prediction models by computing some performance measures, so he hires you in his lab to work on this problem. Your task is to use the data provided above to determine the following values: 1. True positives (TP): A true positive is an outcome where the model correctly predicts the positive outcome. For example, if y_original (i) is 1 and y_predicted (i) is also 1 then we have a true positive. False positives (FP): A false positive is an outcome where the model incorrectly predicts the positive outcome. For example, if y_original (i) is 0 but y_predicted (i) is 1 then we have a false positive. 3. False negatives (FN): A false negative is an outcome where the model incorrectly predicts the negative outcome. For example, if y_original (i) is 1 but y_predicted (i) is 0 then we have a false negative. 2. True negatives (TN): A true negative is an outcome where the model correctly predicts the negative outcome. For example, if y_original (i) is 0 and y_predicted (i) is also 0 then we have a true negative. 'i' refers to the ith element in the vectors. 4. Your task is to write a program that compares the two vectors to get a total number of TPs, FPs, FNs and TNs. While each of the above values could be calculated using a single line of code, you MUST use a loop (for or while), and some if and' elseif statements to compute them. Professor John Doe has developed a novel classification algorithm (model) for diagnosing early onset of lung cancer. Dr. Doe has collected data from 1000 participants with half of them diagnosed with lung cancer and half of them do not have lung cancer. To test the effectiveness of his algorithm he has two sets of data: A vector named y_original that has values of 0's and 1's where 0 means "does not have lung cancer" and 1 means "has lung cancer". These are values with correct outcomes for the 1000 patients. b. A vector of data named y_predicted. Using his prediction model, he has generated the y_predicted vector of 1000 values that also contain 0's and 1's. These are the predicted outcomes of the same 1000 patients. a. Dr. Doe is interested in knowing if his prediction model is comparable to the existing prediction models by computing some performance measures, so he hires you in his lab to work on this problem. Your task is to use the data provided above to determine the following values: 1. True positives (TP): A true positive is an outcome where the model correctly predicts the positive outcome. For example, if y_original (i) is 1 and y_predicted (i) is also 1 then we have a true positive. False positives (FP): A false positive is an outcome where the model incorrectly predicts the positive outcome. For example, if y_original (i) is 0 but y_predicted (i) is 1 then we have a false positive. 3. False negatives (FN): A false negative is an outcome where the model incorrectly predicts the negative outcome. For example, if y_original (i) is 1 but y_predicted (i) is 0 then we have a false negative. 2. True negatives (TN): A true negative is an outcome where the model correctly predicts the negative outcome. For example, if y_original (i) is 0 and y_predicted (i) is also 0 then we have a true negative. 'i' refers to the ith element in the vectors. 4. Your task is to write a program that compares the two vectors to get a total number of TPs, FPs, FNs and TNs. While each of the above values could be calculated using a single line of code, you MUST use a loop (for or while), and some if and' elseif statements to compute them.
Expert Answer:
Related Book For
Solving Problems In Technical Communication
ISBN: 9780226924076
1st Edition
Authors: Johndan Johnson-Eilola, Stuart A. Selber
Posted Date:
Students also viewed these mechanical engineering questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
The Canadian Bankers Association is pleased to provide this submission in response to Finance Canada's January 2019 consultation paper (the Consultation Paper) on the merits of open banking in...
-
Identify each of the following items as revenues, expenses, or withdrawals from the drop down provided. 1. Advertising expense 2. Consulting revenue 3. Rent expense 4. Rental income 5. Wages expense...
-
Answer true or false for each statement. 1. If a < b, then a must be a negative number. 2. The absolute value of an integer is always 0 or a positive number. 3. A negative number is always less than...
-
What are the different types of databases? How do they differ?
-
Explain why rotation (change) of the lead auditor is important.
-
Watson Technical Institute (WTI), a school owned by Tom Watson, provides training to individuals who pay tuition directly to the school. WTI also offers training to groups in off-site locations. Its...
-
a) i] Define the term management? [1 marks] ii] Managers must have specific skills and play certain roles in organizations if they are to inspire employees to meet organizational objectives; explain...
-
1. (i) Let h = h(r) be a harmonic function on R", n 2, and T = T(t) be a smooth function of time. Then, show that the vector field v(r,t)= Vh(r)T(t) is a solution of the Euler equations. (ii) Find...
-
Many aspects of math can easily be seen in everyday life and other arent as visible but are still present.By learning about Expected Value, Correlation and Regression. Reflect and describe a time...
-
Canada has three major federal political parties: The Liberal Party of Canada, The Conservative Party of Canada, and the New Democratic Party (NDP). Your assignment is to read articles about each of...
-
To analyze the issue of poor leadership in organizations, which research paradigm works best: Interpretivism or constructivism?
-
Determine the molar enthalpy of combustion of hydrogen sulfide [HS(g)], given the following thermochemical equations. [5 marks] 2 HS(g) +30(g) t 2 SO2(g) +2 HO(1) (1) H2) + O2(g) HO() + 285.8 kJ (2)...
-
Discuss why company's financial outlook may be positive despite poor management of inventory. Identify various operational challenges faced as a result of poor inventory management. Critically...
-
Readers Digest has asked you to analyze an investment proposal that it has received. This proposal relates to Readers Digest producing a CD-ROM version that will contain the text of all of the...
-
A firm has the following balance sheet: Assets Cash Accounts receivable Inventory Plant and equipment $ 15,000 150,000 92,000 170,000 $427,000 Liabilities and Equity Accounts payable Long-term debt...
-
Using the context provided in question 3, write a short position statement indicating where you stand on this particular argument-and why. Develop your own response contributing to the conversation,...
-
Concerning the decision-making processes of people in workplaces, Mary Douglas (1986, 4) asserts that "an answer is only seen to be the right one if it sustains the institutional thinking that is...
-
Fieldworkers sometimes categorize the comments in their fieldnotes as either observational, procedural (notes about steps in the process), or theoretical (hunches or hypotheses about what has been...
-
Consider a strictly risk averse agent endowed with initial wealth \(w_{0}\) and with a strictly increasing and twice differentiable utility function. Let \(r_{f}\) and \(\tilde{r}\) denote the return...
-
Consider the optimal portfolio choice problem in the presence of \(N\) risky assets with returns \(\left(\tilde{r}_{1}, \ldots, \tilde{r}_{N} ight)\) and of a risk free asset with return \(r_{f}>0\)....
-
Consider a quadratic utility function \(u(x)=x-\frac{b}{2} x^{2}\), an initial wealth \(w_{0}=100\), a risk free rate \(r_{f}=1.1\) and a risky asset with expected return...
Study smarter with the SolutionInn App