Question 9.1
Using the same crime data set uscrime.txt as in Question 8.2, apply Principal Component Analysis
and then create a regression model using the first few principal components. Specify your new model in
terms of the original variables (not the principal components), and compare its quality to that of your
solution to Question 8.2. You can use the R function prcomp for PCA. (Note that to first scale the data,
you can include scale. = TRUE to scale as part of the PCA function. Don’t forget that, to make a
prediction for the new city, you’ll need to unscale the coefficients (i.e., do the scaling calculation in
reverse)!)
Question 10.1
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 package 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).
2. Get your favorite AI to repeat part 1(b); compare its answer with yours, and judge where each one is
better and worse, and (if at all) where each one is wrong. Include the prompt/chat logs in your
homework submission, and specify which AI you used.
• For this part of the question only, the course AI Use Policy is overridden; for this part, I
want you to see what solution the AI gives. For suggestions on how to effectively use AI as a
productivity tool for this sort of thing, please see the AI Use Policy (which includes a tutorial
on how to use AI) in the Course Information module on Canvas (for Georgia Tech students)
or edX (for edX students).
Question 10.2
Describe a situation or problem from your job, everyday life, current events, etc., for which a logistic
regression model would be appropriate. List some (up to 5) predictors that you might use.
Question 10.3
1. Using the GermanCredit data set germancredit.txt from
http://archive.ics.uci.edu/ml/machine-learning-databases/statlog/german / (description at
http://archive.ics.uci.edu/ml/datasets/Statlog+%28German+Credit+Data%29 ), use logistic
regression to find a good predictive model for whether credit applicants are good credit risks or
not. Show your model (factors used and their coefficients), the software output, and the quality