Fit a logistic regression model on the "Caravan" data set from
the R package "ISLR". This data set, also analyzed in Sec 4.6.6 of
ISLR, has 85 predictors and the response variable is "Purchase"
that is equal to "Yes" or "No".
We use the first 1000 obs as the test data and the remaining as
the training data. In the test data, there are 941 "No" and 59
"Yes". For each of the approaches below, report the number of
mis-classified samples among the 941 "No" and the number of
mis-classified samples among 59 "Yes", if we use 0.25 as the
predicted probability cut-off. Also use the R package "pROC" to
report the corresponding AUC. For the definition of AUC and ROC,
read pp146-149 of ISLR.
Fit a logistic regression model using all 85
predictors, and obtain the predicted probabilities on the
test data.
Fit a logistic regression model on the "Caravan" data set from the R package "ISLR". This data set, also analyzed in Sec
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am