Ignore:
Timestamp:
02/07/12 19:59:36 (2 years ago)
Author:
markotoplak
Branch:
default
Message:

Updated examples (remove Orange.core).

File:
1 edited

Legend:

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

    r9638 r9946  
    22iris = Orange.data.Table("iris") 
    33 
    4 rndind = Orange.core.MakeRandomIndices2(iris, p0=0.8) 
     4rndind = Orange.data.sample.SubsetIndices2(iris, p0=0.8) 
    55train = iris.select(rndind, 0) 
    66test = iris.select(rndind, 1) 
     
    88knn = Orange.classification.knn.kNNLearner(train, k=10) 
    99for i in range(5): 
    10     instance = test.randomexample() 
     10    instance = test.random_example() 
    1111    print instance.getclass(), knn(instance) 
Note: See TracChangeset for help on using the changeset viewer.