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/optimization-tuning1.py

    r9372 r9823  
    22 
    33learner = Orange.classification.tree.TreeLearner() 
    4 data = Orange.data.Table("voting") 
     4voting = Orange.data.Table("voting") 
    55tuner = Orange.optimization.Tune1Parameter(object=learner, 
    66                           parameter="minSubset", 
    77                           values=[1, 2, 3, 4, 5, 10, 15, 20], 
    88                           evaluate = Orange.evaluation.scoring.AUC, verbose=2) 
    9 classifier = tuner(data) 
     9classifier = tuner(voting) 
    1010 
    1111print "Optimal setting: ", learner.minSubset 
    1212 
    1313untuned = Orange.classification.tree.TreeLearner() 
    14 res = Orange.evaluation.testing.cross_validation([untuned, tuner], data) 
     14res = Orange.evaluation.testing.cross_validation([untuned, tuner], voting) 
    1515AUCs = Orange.evaluation.scoring.AUC(res) 
    1616 
     
    1919 
    2020learner = Orange.classification.tree.TreeLearner(minSubset=10).instance() 
    21 data = Orange.data.Table("voting") 
     21voting = Orange.data.Table("voting") 
    2222tuner = Orange.optimization.Tune1Parameter(object=learner, 
    2323                    parameter=["split.continuousSplitConstructor.minSubset",  
     
    2626                    evaluate = Orange.evaluation.scoring.AUC, verbose=2) 
    2727 
    28 classifier = tuner(data) 
     28classifier = tuner(voting) 
    2929 
    3030print "Optimal setting: ", learner.split.continuousSplitConstructor.minSubset 
Note: See TracChangeset for help on using the changeset viewer.