source: orange/docs/reference/rst/code/ @ 9823:7f9c3f3c6474

Revision 9823:7f9c3f3c6474, 297 bytes checked in by lanumek, 2 years ago (diff)

Changed names of data sets (table replaced with data or name of the data set).

1import Orange
2iris ="iris")
4knn = Orange.classification.knn.kNNLearner()
5knn.k = 10
6knn.distance_constructor = Orange.core.ExamplesDistanceConstructor_Hamming()
7knn = knn(iris)
8for i in range(5):
9    instance = iris.randomexample()
10    print instance.getclass(), knn(instance)
Note: See TracBrowser for help on using the repository browser.