Ticket #699 (new bug)

Opened 3 years ago

kNN with k bigger then the number of examples

Reported by: jurezb Owned by:
Milestone: Future Component: orng_modules
Severity: minor Keywords:
Cc: Blocking:
Blocked By:


When I set k larger then the numer of examples the AUC should be the same.

import orange, orngTest, orngStat

data = orange.ExampleTable('lenses.tab')
res = orngTest.crossValidation([orange.kNNLearner(k=50), orange.kNNLearner(k=500)], data)

print 'Number of examples:', len(data)
print 'AUC:', orngStat.AUC(res)


Number of examples: 24
AUC: [0.8129032258064517, 0.31612903225806455]
Note: See TracTickets for help on using tickets.