Skip to content

Commit

Permalink
Update errata.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
pbharrin committed Oct 20, 2012
1 parent 95d96a4 commit a72b671
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions errata.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
**On page 17: (not in a code listing)**

The line:

``myEye = randMat*invRandMat``

should appear above the line:

``>>> myEye – eye(4)``


**Listing 2.2 bottom of page 25-page26**

A better version of the function file2matrix() is given below. The code in the book will work.
Expand Down Expand Up @@ -49,6 +60,24 @@ should be:

``datingDataMat, datingLabels = file2matrix('datingTestSet2.txt')``

**Page 41 (not a code listing)**

l(xi) = log2p(xi)

Should be:

l(xi) = -log2p(xi)

**Page 42: Listing 3.1**

The line:

``labelCounts[currentLabel] = 0``

should be indented from the lines above and below it. The code in the repo is correct.



**Listing 3.3 page 45**

``bestFeature = I``
Expand All @@ -57,6 +86,16 @@ should be:

``bestFeature = i``


**Page 52 (not a code listing)**

``>>> treePlotter.retrieveTree(1)``

should return:

``{'no surfacing': {0: 'no', 1: {'flippers': {0: {'head': {0: 'no', 1: 'yes'}}, 1: 'no'}}}}``


**page 104 (not a code listing)**

|wTx+b|/ ||w||
Expand Down

0 comments on commit a72b671

Please sign in to comment.