source: orange-reliability/docs/rst/code/reliability-run.py @ 39:5e0e4eb49fd1

Revision 39:5e0e4eb49fd1, 651 bytes checked in by markotoplak, 7 months ago (diff)

Updated examples

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
8housing = 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], housing)
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.