Publications by Sara Shirinkam

Assignment 5

16.07.2021

#install.packages("dplyr") library(ISLR) ## Warning: package 'ISLR' was built under R version 4.0.5 #library(dplyr) #library(tidyr) library(pls) ## Warning: package 'pls' was built under R version 4.0.5 ## ## Attaching package: 'pls' ## The following object is masked from 'package:stats': ## ## loadings 2. For parts (a) through (c), i...

7194 sym R (9082 sym/70 pcs) 7 img

Linear Regression

18.06.2021

library(ISLR) ## Warning: package 'ISLR' was built under R version 4.0.5 Question 2 Carefully explain the differences between between the KNN classifier and KNN regression methods. KNN classifier : The goal of the KNN classifier is classification, where the response variable is categorical. Given a positive integer K and a test observation x0, ...

6824 sym R (11094 sym/41 pcs) 4 img

Document

03.07.2021

library(ISLR) ## Warning: package 'ISLR' was built under R version 4.0.5 10. This question should be answered using the Weekly data set, which is part of the ISLR 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...

7904 sym R (21369 sym/148 pcs) 2 img

Assignment 4

09.07.2021

Question 3 We now review k-fold cross-validation(a) Explain how k-fold cross-validation is implemented. This approach involves randomly dividing the set of observations into k groups or folds of approximately equal size. The first fold is treated as a validation set and the method is fit on the remaining (k-1) folds. The mean squared error is c...

8337 sym R (10024 sym/51 pcs)

Assignment 6

03.08.2021

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 a plot of the ...

3203 sym R (10972 sym/39 pcs) 6 img

Assignment 7

07.08.2021

Exercise 3. Consider the Gini index, classification error, and cross-entropy in a simple classification setting with two classes. Create a single plot that displays each of these quantities as a function of ˆpm1. The xaxis should display ˆpm1, ranging from 0 to 1, and the y-axis should display the value of the Gini index, classification error, ...

4915 sym R (11584 sym/79 pcs) 5 img

Assignment 8

14.08.2021

Exercise 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...

5789 sym R (56644 sym/112 pcs) 8 img