Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!