Packages and settings – R and Python
For R, we need pscl
and ROCR
packages. The path settings are dealt with to kick-off the chapter:
- First set the working directory:
setwd("MyPath/R/Chapter_07")
- Load the required R packages:
library(RSADBE) library(pscl) library(ROCR)
- We have the published Python notebook file
Chapter_10_CART_and_Beyond.ipynb
in the output folder:
We are now set to begin the proceedings.
The binary regression problem
Consider the problem of modeling the completion of a stat course by students based on their Scholastic Assessment Test in the subject of mathematics SAT-M scores at the time of their admission. After the completion of the final exams we know which students successfully completed the course and which of them failed. Here, the output pass/fail may be represented by a binary number 1/0. It may be fairly said that the higher the SAT-M scores at the time of admission to the course, the more likelihood of the candidate completing the course. This problem...