
#101




Quote:
1) We first fit the most complex regression tree (within constraints such as max depth, etc) by specifying CP=0. rpart uses xvalidation to determine the prediction error for each level of the complexity parameter investigated. 2) Prune the tree by capturing the CP that minimizes the crossvalidation error, xerror. (Is this cost complexity pruning??). The following output shoudl do this: Code:
pdt2 < prune(dt2, cp = dt2$cptable[which.min(dt2$cptable[, "xerror"]), "CP"]) MSE values emerge in the output? Do anything with these yet? Pruned tree plot shown and summarized with summary(). Estimates given for each split. Next chunk uses 6fold crossvalidation folds and expands the grid to search for cp from 0, 0.05, 0.005. 3) The final model is fitted: Code:
caret1 <train(dt2.f, data = AutoClaim.training, method = "rpart", trControl = fitControl, metric="RMSE", tuneGrid = Grid, na.action = na.pass) AppropriateI believe the *full* model runs the entire data set. Final model tree shown, along with CP vs RMSE (CV) plot. I wish the validation/testing set(s) we not ignored in the only regression tree example. I also didn't see any predict() functions; how do we determine the RMSE that "we report." THANK YOU
__________________
Exams: VEE: FAP: Conferences: APC 
#102




Quote:
You can calculate ur own RMSE using ur predictions. Get ur predictions from pred < predict(tree.model, newdata = "testdata") rmse < sqrt(sum((pred  testdata$target)^2)/length(testdata$target)) 
#103




Quote:
FWIW, I am referring to ASA 7.2, which devotes as much time to the regression as secondary schools do to important black history figures not named MLK, Parks or Tubman.
__________________
Exams: VEE: FAP: Conferences: APC 
#104




Quote:

#105




Quote:

#108




Anyone came across some video tutorials for R that are free and helpful?
Using the book R for Everyone and progressing very slowly. Still on Module 1 and Chapter 7 of the book, dont think Ill make it in time for the exam in June.
__________________
APC 
#110




Section 8.2
In section 8.2, the module keeps referring to the "elbow" in the attached graph and it goes on to say "they form three easily identified groups." Can someone help me find the elbow in the graph and how they got to the "easily identified" groups and the value conditions? I appreciate the help!
__________________
__________________ 
Thread Tools  Search this Thread 
Display Modes  

