Design and Technology > QUESTIONS & ANSWERS > isye6501-fa19-homework 7 (All)
10.1 Using the same crime data set uscrime.txt as in Questions 8.2 and 9.1, find the best model you can using (a) a regression tree model, and (b) a random forest model. In R, you can use the tree p... ackage or the rpart package, and the randomForest package. For each model, describe one or two qualitative takeaways you get from analyzing the results (i.e., don’t just stop when you have a good model, but interpret it too). Check out tree. This will do a binary recursive partitioning using responses in the specified formula and choose splits. Needs formula and data at least. Try first run of tree.This shows that the variables used in tree construction include Po1, Pop, LF and NW. This shows that police expenditure affects crime rates, with 7.65 being a cutoff. Additional decision trees are found underneath each of these branches. Number of leaves are 7. “where” gives an integer vector giving the row nubmer of the frame with information on the node to which each data point is assigned. Looking into “frame” is better though because it gives us a data frame with a row for each node and node numbers. It shows where the leaves are (specified as ), number of data points reaching that node, and where teh splits occur (e.g. Po1 splits at 7.65). THe total residual deviance is 1896000 = sum of squares of the residuals. [Show More]
Last updated: 2 years ago
Preview 1 out of 19 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Jul 22, 2022
Number of pages
19
Written in
This document has been written for:
Uploaded
Jul 22, 2022
Downloads
0
Views
322
In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·