source: orange/docs/reference/rst/code/reliability_basic.py @ 9906:77274e331dbb

Revision 9906:77274e331dbb, 557 bytes checked in by lanumek, 2 years ago (diff)

Test scrip for hierarchical clustering.

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.core.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.