Publications by Karla Jimenez

Algo II - Assignment 02

18.06.2020

####Question 2: Carefully explain the difference between the KNN classifier and KNN regression methods. #####Answer: The KNN Classifier is a method for estimated the conditional distribution of Y given X that is best used when the aim is to predict a qualitative response. If you are given a test observation and a positive interger K, the KNN clas...

1227 sym R (12336 sym/38 pcs) 4 img

Algo II - Assignment 06

24.07.2020

###Question 6 library(ISLR) library(boot) set.seed(1) #a) Perform polynomial regression to predict "wage" usnig "age". Use cross-validation to select the optimal degree d for the polynomial. What degree was chosen, and how how does this compare to the results of hypothesis testing using ANOVA ? Make a plot of the resulting polynomial fit to the ...

82 sym R (6504 sym/22 pcs) 6 img

Document

02.07.2020

Algo II - Assignment # 4 ####Q3 We now review k-fold cross-validation. ####Q5. In Chapter 4, we used logistic regression to predict the probability of default using income and balance on the Default data set. We will now estimate the test error of this logistic regression model using the validation set approach. Do not forget to set a random seed...

974 sym R (9679 sym/43 pcs)

Algo II - Assignment 03

26.06.2020

Assignment 3 - Chapter 4 | Problems 10,11,13 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 1089 weekly returns for 21 years, from the beginning of 1990 to the end of 2010. Produ...

1619 sym R (17870 sym/94 pcs) 5 img

Algo II - Assignment 05

10.07.2020

Qs 2,9,11 Question 2 For part (a) through (c), indicate which of i through iv is correct. Justify. (a)The lasso, relative to least squares, is: The lasso is less flexible and will give improved prediction when its increase in bias is less than its decrease in variance (b)Repeat (a) for ridge regression relative to least squares Ridge regress...

928 sym R (8345 sym/53 pcs) 6 img

Algo II - Assignment 08

07.08.2020

Homework 8 - Questions 5,7,8 Q5. 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. #Generate a data set with...

590 sym R (18078 sym/99 pcs) 26 img

Algo II - Assignment 07

28.07.2020

Question 3 Consider the Gini index, classification error, and cross-entropy in a simple 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 0 to 1, and the y-axis should display the value of the Gini index, classification error, and entropy. ...

721 sym R (9776 sym/59 pcs) 7 img

Radical!

26.09.2020

library(magick) ## Warning: package 'magick' was built under R version 4.0.2 ## Linking to ImageMagick 6.9.9.39 ## Enabled features: cairo, fontconfig, freetype, lcms, pango, rsvg, webp ## Disabled features: fftw, ghostscript, x11 radical <- image_read("Documents/MSDA/D&A Applications Class/Case Studies/radical.gif") radical ...

6 sym R (323 sym/4 pcs) 1 img