Ignore:
Timestamp:
02/06/12 20:01:02 (2 years ago)
Author:
lanumek
Branch:
default
Children:
9835:e48466fc6eb2, 9841:05a160804431
rebase_source:
8cf30121654f25c9cb6d8ac9bdaf163e305d62da
Message:

Changed names of data sets (table replaced with data or name of the data set).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/code/reliability-run.py

    r9683 r9823  
    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  
    71import Orange 
    8 Orange.evaluation.reliability.select_with_repeat.random_generator = None 
    9 Orange.evaluation.reliability.select_with_repeat.randseed = 42 
    10  
    11 import Orange 
    12 table = Orange.data.Table("housing.tab") 
     2housing = Orange.data.Table("housing.tab") 
    133 
    144knn = Orange.classification.knn.kNNLearner() 
    155reliability = Orange.evaluation.reliability.Learner(knn) 
    166 
    17 results = Orange.evaluation.testing.cross_validation([reliability], table) 
     7results = Orange.evaluation.testing.cross_validation([reliability], housing) 
    188 
    19 for i, instance in enumerate(results.results[:10]): 
    20     print "Instance", i 
    21     for estimate in instance.probabilities[0].reliability_estimate: 
    22         print "  ", estimate.method_name, estimate.estimate 
     9for estimate in results.results[0].probabilities[0].reliability_estimate: 
     10    print estimate.method_name, estimate.estimate 
Note: See TracChangeset for help on using the changeset viewer.