Publications by Adam Ramsey
Assignment 8, Chapter 9
Problem 5 We have seen that we can fit an SVM with a non-linear kernel in order to perform classification using a non-linear decision boundary. We will now see that we can also obtain a non-linear decision boundary by performing logistic regression using non-linear transformations of the features. (a) Generate a data set with n = 500 and p = 2...
4577 sym R (11437 sym/58 pcs) 5 img
Assignment 7, Chapter 8
Problem 3 Consider the Gini index, classification error, and entropy in a simple classification setting with two classes. Create a single plot that displays each of these quantities as a function of \(\hat{p}_{m1}\) . The x-axis should display \(\hat{p}_{m1}\) , ranging from 0 to 1, and the y-axis should display the value of the Gini index, cl...
3986 sym R (6460 sym/36 pcs) 5 img 1 tbl
Assignment 6, Chapter 7
Problem 6 In this exercise, you will further analyze the Wage data set considered throughout this chapter. (a) Perform polynomial regression to predict wage using age. Use cross-validation to select the optimal degree d for the polynomial. What degree was chosen, and how does this compare to the results of hypothesis testing using ANOVA? Make ...
1704 sym R (6253 sym/16 pcs) 5 img
Assignment 5, Chapter 6
Problem 2 For parts (a) through (c), indicate which of i. through iv. is correct. Justify your answer. (a) The lasso, relative to least squares, is: i. More flexible and hence will give improved prediction accuracy when its increase in bias is less than its decrease in variance. ii. More flexible and hence will give improved prediction accurac...
3943 sym R (2329 sym/33 pcs) 2 img
Assignment 4, Chapter 5
Problem 3 We now review k-fold cross-validation. (a) Explain how k-fold cross-validation is implemented. k-fold cross-validation is implemented by dividing observations into k groups, using the first fold as the validation set, and fitting the method on the remaining folds. (b) What are the advantages and disadvantages of k-fold cross-validati...
5701 sym R (4817 sym/39 pcs)
Assignment 3, Chapter 4
Problem 13 This question should be answered using the Weekly data set, which is part of the ISLR2 package. This data is similar in nature to the Smarket data from this chapter’s lab, except that it contains 1, 089 weekly returns for 21 years, from the beginning of 1990 to the end of 2010. library(ISLR2) attach(Weekly) (a) Produce some numer...
6041 sym R (11105 sym/112 pcs) 1 img
Assignment 2, Chapter 3
Problem 2 Carefully explain the differences between the KNN classifier and KNN regression methods. The KNN classifier attempts to determine which classification a value would have based on nearest neighbors, while the KNN regression attempts to predict the output value itself based on nearest neighbors. Problem 9 This question involves the use...
4439 sym R (7147 sym/29 pcs) 3 img