source: orange/docs/reference/rst/code/reliability-run.py @ 9680:4689e76f99be

Revision 9680:4689e76f99be, 438 bytes checked in by Matija Polajnar <matija.polajnar@…>, 2 years ago (diff)

Updated documentation and regression tests for reliability estimation. Closes #1058.

Line 
1import Orange
2table = Orange.data.Table("housing.tab")
3
4knn = Orange.classification.knn.kNNLearner()
5reliability = Orange.evaluation.reliability.Learner(knn)
6
7results = Orange.evaluation.testing.cross_validation([reliability], table)
8
9for i, instance in enumerate(results.results[:10]):
10    print "Instance", i
11    for estimate in instance.probabilities[0].reliability_estimate:
12        print "  ", estimate.method_name, estimate.estimate
Note: See TracBrowser for help on using the repository browser.