source: orange/docs/reference/rst/code/reliability-run.py @ 9681:b278e50a6071

Revision 9681:b278e50a6071, 646 bytes checked in by Matija Polajnar <matija.polajnar@…>, 2 years ago (diff)

Reliability: add headers to regression test scripts.

Line 
1# Description: Reliability estimation with cross-validation
2# Category:    evaluation
3# Uses:        housing
4# Referenced:  Orange.evaluation.reliability
5# Classes:     Orange.evaluation.reliability.Learner
6
7import Orange
8table = Orange.data.Table("housing.tab")
9
10knn = Orange.classification.knn.kNNLearner()
11reliability = Orange.evaluation.reliability.Learner(knn)
12
13results = Orange.evaluation.testing.cross_validation([reliability], table)
14
15for i, instance in enumerate(results.results[:10]):
16    print "Instance", i
17    for estimate in instance.probabilities[0].reliability_estimate:
18        print "  ", estimate.method_name, estimate.estimate
Note: See TracBrowser for help on using the repository browser.