Blaz Zupan avatar Blaz Zupan committed c9ec072

corrected error with 25th data instance

Comments (0)

Files changed (2)

docs/tutorial/rst/code/data-instances1.py

     print d
 
 print "25-th data instance:"
-print data[26]
+print data[24]
 
 name = "sepal width"
 print "Value of '%s' for the first instance:" % name, data[0][name]
-print "The 3rd value of the 25th data instance:", data[26][2]
+print "The 3rd value of the 25th data instance:", data[24][2]

docs/tutorial/rst/data.rst

    [4.9, 3.0, 1.4, 0.2, 'Iris-setosa']
    [4.7, 3.2, 1.3, 0.2, 'Iris-setosa']
    25-th data instance:
-   [5.0, 3.4, 1.6, 0.4, 'Iris-setosa']
+   [4.8, 3.4, 1.9, 0.2, 'Iris-setosa']
    Value of 'sepal width' for the first instance: 3.5
-   The 3rd value of the 25th data instance: 1.6
+   The 3rd value of the 25th data instance: 1.9
 
 Iris data set we have used above has four continous attributes. Here's a script that computes their mean:
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.