Publications by Jenna Wallace

HW2 Jenna Wallace

07.02.2022

Problem #2 Carefully explain the differences between the KNN classifier and KNN regression methods. KNN classifier method Given a positive integer K and a test observation x0, the KNN classifier identifies the K points in the training data that are closest to x0, represented by N0. It then estimates the conditional probability for class j as the...

7045 sym R (11843 sym/39 pcs) 5 img

HW6 Jenna Wallace

02.04.2022

Exercise 6 - Wage data set (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 a plot of the resulting polynomial fit to the data. It appears that the optimal...

2187 sym R (8735 sym/40 pcs) 6 img

HW5 Jenna Wallace

27.03.2022

Exercise 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: Less flexible and hence will give improved prediction accuracy when its increase in bias is less than its decrease in variance The lasso leads to qualitatively similar behavior to ridge regressi...

6608 sym R (21203 sym/122 pcs) 6 img

HW3 Jenna Wallace

05.03.2022

Exercise 10 (a) Produce some numerical and graphical summaries of the Weekly data. Do there appear to be any patterns? All of the lag coefficients are very close to zero, which indicates there is very little correlation between this week’s return and the previous week’s return. There only looks to be one correlation and that is between y...

9341 sym R (24235 sym/151 pcs) 5 img

HW4 Jenna Wallace

12.03.2022

Exercise 3 k-fold cross-validation. (a) Explain how k-fold cross-validation is implemented. We divide the data set into K different sets (folds) which are equal in size. We remove the first set, which functions as a validation set, and the method is fit on the remaining sets (k − 1). The mean squared error is computed on the observations in...

7067 sym R (11536 sym/65 pcs)

HW7 Jenna Wallace

16.04.2022

library(ISLR) library(rpart) library(caret) library(MASS) library(tree) library(rattle) Exercise 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 p^m1. The x-axis should display p^m1, ranging from ...

4636 sym R (8677 sym/54 pcs) 9 img

HW8 Jenna Wallace

23.04.2022

library(e1071) library(ISLR) library(caret) ## Loading required package: ggplot2 ## Loading required package: lattice library(tidyverse) ## -- Attaching packages --------------------------------------- tidyverse 1.3.1 -- ## v tibble 3.1.6 v dplyr 1.0.8 ## v tidyr 1.2.0 v stringr 1.4.0 ## v readr 2.1.2 v forcats 0.5.1 ## v ...

4536 sym R (22781 sym/69 pcs) 8 img