Ignore:
Timestamp:
02/05/12 22:37:07 (2 years ago)
Author:
umek@…
Branch:
default
rebase_source:
eb6a120705f3462186b982a698c0a7ad9f947e24
Message:

Changed table to data or name of the data set.

For example - instead of

table = Orange.data.Table("housing")

is changed to

housing = Orange.data.Table("housing")

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/code/knnlearner.py

    r9372 r9638  
    66 
    77import Orange 
    8 table = Orange.data.Table("iris") 
     8iris = Orange.data.Table("iris") 
    99 
    1010print "Testing using euclidean distance" 
    11 rndind = Orange.core.MakeRandomIndices2(table, p0=0.8) 
    12 train = table.select(rndind, 0) 
    13 test = table.select(rndind, 1) 
     11rndind = Orange.core.MakeRandomIndices2(iris, p0=0.8) 
     12train = iris.select(rndind, 0) 
     13test = iris.select(rndind, 1) 
    1414 
    1515knn = Orange.classification.knn.kNNLearner(train, k=10) 
     
    2020print "\n" 
    2121print "Testing using hamming distance" 
    22 table = Orange.data.Table("iris") 
     22iris = Orange.data.Table("iris") 
    2323knn = Orange.classification.knn.kNNLearner() 
    2424knn.k = 10 
Note: See TracChangeset for help on using the changeset viewer.