Errata

Introduction to Machine Learning with R

Errata for Introduction to Machine Learning with R

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 30
Last paragraph

The last paragraph on page 30 doesn't match the confusion matrix printed above it. For instance, "For cluster 1, there are 48 versicolor and six virginica plants." The confusion matrix printed above it shows that cluster 1 has 46 virginica and 2 versicolor.

Note from the Author or Editor:
This should read as: "For cluster 1, there are 46 virginica and 2 versicolor plants. Cluster 2 has 48 versicolor and 4 virginica, and cluster 3 has only setosa plants. If the algorithm were 100% perfect, we would expect each column to have all of its data in one of the three rows that pertain to the clusters, but this isn't a bad result for a cursory example. It shows that there are only 2 predictions that were off in cluster 1, and 2 predictions that were off in cluster 2. Cluster 3 matches perfectly.

Anonymous  Apr 07, 2019 
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 52
Middle of page

the fifer package is no longer available on CRAN. The page for it says: "Package ‘fifer’ was removed from the CRAN repository. Formerly available versions can be obtained from the archive." The archived page can be found here - https://cran.r-project.org/src/contrib/Archive/fifer/

Note from the Author or Editor:
Change second paragraph to read: "This example takes a 75% sample of the original data. You can see that the distributions are all pretty close to what the main population values are. Now let's try stratified sampling. For this, you can use the archived fifer package and it's stratified() function. You can find the archived package of fifer from the link on CRAN at "https://cran.r-project.org/src/contrib/Archive/fifer/". Save the "fifer_1.1.tar.gz" file to your computer, and using RStudio's install packages option, select the "Install from: Package Archive File" option. Navigate to the file you downloaded and install. This may require the download of dependent packages which can be done in the normal way in RStudio's "Install from: Repository (CRAN)" option.

Anonymous  Aug 10, 2018 
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 73
5th paragraph

Under the Coefficients section at the bottom of the page, the linear equation of the example question should be y = -0.04 + 29.59. The negative sign (-) before the slope is missing.

Note from the Author or Editor:
The correct equation at the bottom should read "y = -0.04x + 29.59"

Anonymous  Oct 19, 2018 
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 196
2nd

confusionMatrix(preds, titanic.test$Survived) code should be confusionMatrix(preds, titanic.test$Survived, positive = "1") The sensitivity discussed .9207 in the second paragraph is really specificity, which is 151/(13+151) as reference "0" category has 164 instances.

Note from the Author or Editor:
The first paragraph should have the numbers changed to align with the output from the confusion matrix: "The correct values are on the diagonal, so in this case it predicted correctly 151 values of the data that were Survived=0, but incorrectly predicted 32 of them. Likewise with the other value of Survived=1, for which it predicted 70 correct values, and 13 incorrect ones." The second paragraph be changed to: "Outputs from this function include sensitivity and specificity. Sensitivity, in this case, is simple the correctly predicted positive cases out of the total number, so 153/(153+13) which gives 0.9207. What that means is that about 93% of the time, you can correctly predict whether someone died on the Titanic. Similarly, specificity is the other column of data in the confusion matrix, which would be calculated like 70/(70+32) and gives 0.6863.

Peter Paprzycki  Mar 22, 2019