An Introduction to Statistical Learning
with Applications in R
Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani
Home | |
About this Book | |
R Code for Labs | |
Data Sets and Figures | |
ISLR Package | |
Get the Book | |
Author Bios | |
Errata |
Errata for the 1st Edition, since the 7th printing (June 2017) and not reflected in online version
Page 254. The glmnet package has been updated so two lines of code need to change. The line
ridge.pred=predict(ridge.mod,s=0,newx=x[test,],exact=T) should be changed to
ridge.pred=predict(ridge.mod,s=0,newx=x[test,],exact=T,x=x[train,],y=y[train])
In addition the line
predict(ridge.mod,s=0,exact=T,type="coefficients")[1:20,] should be changed to
predict(ridge.mod,s=0,exact=T,type="coefficients",x=x[train,],y=y[train])[1:20,]
The code on the website has been updated accordingly.
Lenna Choi
Errata for the 1st Edition, prior to the 7th printing (June 2017) and reflected in online version
Page 52. exercise 2(c), should read "interested in
predicting"
Page 72. The p-value for the Newspaper coefficient in Table 3.3 should be 0.00115.
Page 211. After “…with each response measurement in (6.1).” Add “Typically \hat
\sigma^2 is estimated using the full model containing all predictors.”
Page 212. Equation 6.3 should have a \hat \sigma^2 in the denominator with n, in
the same way as for the equation above it for AIC.
Page 232. The principal components in Figure 6.16 were calculated after first standardizing both pop and ad, a common approach. Hence, the x-axes on Figures 6.15 and 6.16 are not on the same scale.
Page 347. Lines 5 and 15. The references to (9.14) are incorrect. The reference should be to (9.15).
Poul Navin, David Dalpiaz, Jiao Wang, Hiroshi Ochiumi, Jayanth Raman
Errata for the 1st Edition, prior to the 6th printing (October 2015) and reflected in online version
Page 24,
at the end of the last line it should read Fig 2.4
instead of Fig 2.3.
Page 96, the caption to
Figure 3.11 should read "Right: The response has been log transformed…".
Page 104, In Question 7 the
reference to Section 3.3.3 should be to 3.3.2.
Page 150, the first line
after Figure 4.9 should be as follows "is some multiple of 1,275" (not 1,225).
Page 364, The
“newx=dat[-train,]” in the R command at the bottom of the page is incorrect. It
should read “newdata=dat[-train,]”. Correspondingly the 39% at the bottom of the
page should be 10%.
Page 415, The text for exercise 6(b) should read "The researcher decides to
replace the (j,i)th element of X with x_{ji} - \phi_{j1} z_{i1} where..." An
additional like should read "(The
principal component analysis is performed on X^T).
Errata for the 1st Edition, prior to the 4th printing (June 2014) and reflected in online version
Page 149, (4.23) is missing the -1/2 log|\Sigma_k| term.
Page 211: The equation Cp=sigma hat^2(Cp'+n) should be
Cp=sigma hat^2/n(Cp'+n)
Page 254: The parameter to control the number of folds in cv.glmnet() is "nfolds" not "folds".
Page 318, figure 8.8: the colors for OOB: Bagging and OOB:
RandomForest are interchanged in the legend. OOB: RandomForest is lowest.
Page 333, exercise 8 should refer to test MSE rather than
test error rate.