All variables identified as categorical or binary in the codebook should be converted to factor variables. Split
Question:
All variables identified as categorical or binary in the codebook should be converted to factor variables. Split the sample into training (60%) and test (40%) sets with the seed set at 500. Exclude OBS. and CREDIT_EXTENDED from the data set. For classification problems, create the outcome variable (PROFITABLE=1 if NPV>0, =0 otherwise), and convert it into a factor variable. , you will be building both classification models (consider PROFITABLE as dependent variable) and regression models (Consider NPV as dependent variable). For classification problems (predicting PROFITABLE), DO NOT use NPV in the model. For regression problems (predicting NPV), DO NOT use PROFITABLE in the model. Build a Regression Tree model to predict the NPV. What is the training RMSE of the (unpruned) tree? Note : Do not consider the PROFITABLE variable for analysis. What is the best value for the pruned tree? Attach an image of the best pruned tree. Before making a call to the cv.tree function set the seed value to 500. What is the difference in test RMSE of the unpruned and pruned tree for the best value? What is the decision tree considering the first 30 observations. Suppose you use this tree to extend credit to customers in the test data set based on the rule that a loan is only made to those individuals with predicted NPV>0. What would the total profits be?
Build a linear regression model to predict NPV using the same independent variables used above. Now, following the same rule as in the question above, what is the total profit you would make in the test data set?
What is the total profit if you lend money to everyone in the test data set?
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch