rasbt/python-machine-learning-book-2nd-edition

Chapter 5, p159 and p164 (Second edition Fourth release) typo errors?

SimoneGiusso opened this issue · 1 comments

In the last line of the second code block at pag 159:

""Between-class scatter matrix 13x1""

maybe it's a typo error?? The matrix S_B is 13x13 so:

""Between-class scatter matrix 13x13""

Instead at the pag 164, the first line of the code block is:

"X_test_lda = lda.fit_transform(X_test_std)"

but may this is another typo error. So for me this line is:

"X_test_lda = lda.fit_transform(X_test_std, y_test)"

rasbt commented

In the last line of the second code block at pag 159:
""Between-class scatter matrix 13x1""

Good catch, somehow it got truncated in the print version and should be 13x13

Instead at the pag 164, the first line of the code block is:
"X_test_lda = lda.fit_transform(X_test_std)"

Hm, in the version I am looking at this is lda.transform not lda.fit_transform, so the code should be correct -- since we would not want to fit on the test data. So, what's currently in the book should be correct.