source: orange/docs/reference/rst/code/reliability_basic.py @ 9946:96ed77f7d97f

Revision 9946:96ed77f7d97f, 579 bytes checked in by markotoplak, 2 years ago (diff)

Updated examples (remove Orange.core).

Line 
1import Orange
2
3housing = Orange.data.Table("housing.tab")
4
5knn = Orange.classification.knn.kNNLearner()
6
7estimators = [Orange.evaluation.reliability.Mahalanobis(k=3),
8              Orange.evaluation.reliability.LocalCrossValidation(k = 10)]
9
10reliability = Orange.evaluation.reliability.Learner(knn, estimators = estimators)
11
12restimator = reliability(housing)
13instance = housing[0]
14
15value, probability = restimator(instance, result_type=Orange.classification.Classifier.GetBoth)
16
17for estimate in probability.reliability_estimate:
18    print estimate.method_name, estimate.estimate
Note: See TracBrowser for help on using the repository browser.