Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

load(url('https://www.dropbox.com/s/iyqdml9si94zxtf/NBA_1718.rdata?dl=1')) The target variable of the logistic regression is whether the home team wins or loses the given game. We then choose three predictors in

load(url('https://www.dropbox.com/s/iyqdml9si94zxtf/NBA_1718.rdata?dl=1')) The target variable of the logistic regression is whether the home team wins or loses the given game. We then choose three predictors in the model: name of the home team (TEAM), field goals attempted by the home team (FGA), and the number of defense rebounds caught by the home team (DREB). Call the predict function to predict the results of games in the test data frame df_NBA_1718_test, and save the predicted probability of the home team to win in numeric vector pred_prob_test. Then, convert the predicted probabilities into predicted game results in logical values, and save the logical results in vector pred_test, where TRUE means that the home team is predicted to be the winner and FALSE means that they are predicted to lose. d. [1 point + 1 bonus point] Using the predictions from question c, compute the predictions' accuracy and save it in numeric scaler accuracy (please keep the decimal format). Then, compute the predictions' sensitivity and save it in numeric scaler sensitivity. (Hint: Select the comparison results where isWinner is TRUE.)

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

Step: 3

blur-text-image

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

Business Analytics Data Analysis and Decision Making

Authors: S. Christian Albright, Wayne L. Winston

5th edition

1133629601, 9781285965529 , 978-1133629603

More Books

Students also viewed these Mathematics questions

Question

explain what accounting standards are and why they exist.

Answered: 1 week ago

Question

explain the nature of accounting principles and concepts;

Answered: 1 week ago