Changeset 7594:97f71636a401 in orange


Ignore:
Timestamp:
02/05/11 00:33:52 (3 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
68114270f5ee71b0871d10976b7e6e2ca80e3b98
Message:
 
Location:
orange/doc/Orange/rst/code
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orange/doc/Orange/rst/code/optimization-thresholding1.py

    r7589 r7594  
    77thresh80 = Orange.optimization.ThresholdLearner_fixed(learner=learner,  
    88                                                      threshold=0.8) 
    9 res = testing.crossValidation([learner, thresh, thresh80], table) 
    10 CAs = scoring.CA(res) 
     9res = Orange.evaluation.testing.crossValidation([learner, thresh, thresh80], table) 
     10CAs = Orange.evaluation.scoring.CA(res) 
    1111 
    1212print "W/out threshold adjustement: %5.3f" % CAs[0] 
  • orange/doc/Orange/rst/code/optimization-thresholding2.py

    r7589 r7594  
    1111models = [Orange.optimization.ThresholdClassifier(bayes, thr) for thr in thresholds] 
    1212 
    13 res = testing.testOnData(models, test) 
    14 cm = scoring.confusionMatrices(res) 
     13res = Orange.evaluation.testing.testOnData(models, test) 
     14cm = Orange.evaluation.scoring.confusionMatrices(res) 
    1515 
    1616print 
  • orange/doc/Orange/rst/code/optimization-tuning1.py

    r7589 r7594  
    44data = Orange.data.Table("voting") 
    55tuner = Orange.optimization.Tune1Parameter(object=learner, 
    6                                            parameter="minSubset", 
    7                                            values=[1, 2, 3, 4, 5, 10, 15, 20], 
    8                                            evaluate = scoring.AUC, verbose=2) 
     6                           parameter="minSubset", 
     7                           values=[1, 2, 3, 4, 5, 10, 15, 20], 
     8                           evaluate = Orange.evaluation.scoring.AUC, verbose=2) 
    99classifier = tuner(data) 
    1010 
     
    1212 
    1313untuned = Orange.classification.tree.TreeLearner() 
    14 res = testing.crossValidation([untuned, tuner], data) 
    15 AUCs = scoring.AUC(res) 
     14res = Orange.evaluation.testing.crossValidation([untuned, tuner], data) 
     15AUCs = Orange.evaluation.scoring.AUC(res) 
    1616 
    1717print "Untuned tree: %5.3f" % AUCs[0] 
     
    2424                               "split.discreteSplitConstructor.minSubset"], 
    2525                    values=[1, 2, 3, 4, 5, 10, 15, 20], 
    26                     evaluate = scoring.AUC, verbose=2) 
     26                    evaluate = Orange.evaluation.scoring.AUC, verbose=2) 
    2727 
    2828classifier = tuner(data) 
Note: See TracChangeset for help on using the changeset viewer.