Question: Using R and the model file regressiontree.r , predict the individuals' credit scores using an individual regression tree. Use 1 0 0 % of the
Using R and the model file regressiontree.r predict the individuals' credit scores using an individual regression tree. Use of the data for training and validation and set aside no data as a test set. Be sure to exclude the index variable Individual from your analysis. Set the random number seed to
a
Train a full regression tree using a fold crossvalidation experiment.
Hint: The full regression tree can be constructed by setting the complexity parameter cp to zero by inserting the following commands into the regressiontree.r file. Make sure to insert these commands directly before the command that trains the regTreeFit model. Run the entire script when answering this part and part b
grid expand.gridcp
regTreeFull trainCreditScore ~ Individual, data training, method "rpart", trControl ctrl tuneGrid grid
regTreeFull
Report the RMSE from the full regression tree. Round your answer to three decimal places.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
