Publications by Luke Lopez
Predictive Modeling Competition
library(ISLR) library(tidyverse) ## Warning: package 'ggplot2' was built under R version 4.3.2 ## Warning: package 'tidyr' was built under R version 4.3.2 ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.4 ## ✔ f...
1961 sym R (22756 sym/60 pcs) 2 img
Assignment 8
Chapter 09 (page 398): 5, 7, 8 library(ggplot2) ## Warning: package 'ggplot2' was built under R version 4.3.2 library(ISLR2) library(e1071) 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 p...
4674 sym R (8481 sym/54 pcs) 12 img
Assignment #6
Chapter 07 (page 297): 6, 10 Question #6: Perform polynomial regression to predict wage using age. Use cross-validation to select the optimal degree d for the polyno- mial. 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. library(ISLR) libr...
1636 sym R (5446 sym/24 pcs) 8 img
Assignment#5
Ch.6: 2,9,11 For parts (a) through (c), indicate which of i. through iv. is correct. Justify your answer. The lasso, relative to least squares, is: More flexible and hence will give improved prediction accuracy when its increase in bias is less than its decrease in variance. More flexible and hence will give improved prediction accuracy when its...
4179 sym R (11525 sym/56 pcs) 6 img
Assignment #4: Cross Validation
We now review k-fold cross-validation. Explain how k-fold cross-validation is implemented. In this approach, the dataset is randomly divided into k groups, or folds, each of similar size. One fold is designated as the validation set, while the remaining k - 1 folds are used for training the model. The validation set is then evaluated to compute t...
6408 sym R (8462 sym/54 pcs)
ISLR Assignment #2
library(ISLR) library(MASS) library(ISLR) library(MASS) The difference between the KNN classifier and KNN regression methods is that the classifier is used in situations where the response variable is categorical (qualitative), while the regressor is used in numerical situations (quantitative). The KNN classifier shows Y as 0 or 1, while the KNN r...
4655 sym R (16219 sym/34 pcs) 8 img