Ignore:
Timestamp:
03/15/11 17:37:40 (3 years ago)
Author:
jzbontar <jure.zbontar@…>
Branch:
default
Convert:
740acd1f10088836cd59cc02a37c51b69bb0c588
Message:

Rename camel case identifiers in Orange.evaluation.testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/doc/Orange/rst/code/testing-test.py

    r7738 r7752  
    11import Orange 
     2import orngTest 
    23import random 
     4import Orange.evaluation.testing 
    35 
    46table = Orange.data.Table("voting") 
     
    1719print "\nproportionsTest that will always give the same results" 
    1820for i in range(3): 
    19     res = Orange.evaluation.testing.proportionTest(learners, table, 0.7) 
     21    res = Orange.evaluation.testing.proportion_test(learners, table, 0.7) 
    2022    printResults(res) 
    2123 
     
    2426myRandom = Orange.core.RandomGenerator() 
    2527for i in range(3): 
    26     res = Orange.evaluation.testing.proportionTest(learners, table, 0.7, 
     28    res = Orange.evaluation.testing.proportion_test(learners, table, 0.7, 
    2729        randomGenerator=myRandom) 
    2830    printResults(res) 
     
    3234    print "\nproportionsTest that will give different results each time it is run" 
    3335    for i in range(3): 
    34         res = Orange.evaluation.testing.proportionTest(learners, table, 0.7, 
     36        res = Orange.evaluation.testing.proportion_test(learners, table, 0.7, 
    3537            randseed=random.randint(0, 100)) 
    3638        printResults(res) 
     
    3840 
    3941print "\nproportionsTest + storing classifiers" 
    40 res = Orange.evaluation.testing.proportionTest(learners, table, 0.7, 100, 
     42res = Orange.evaluation.testing.proportion_test(learners, table, 0.7, 100, 
    4143    storeClassifiers=1) 
    4244print "#iter %i, #classifiers %i" % \ 
     
    4446 
    4547print "\nGood old 10-fold cross validation" 
    46 res = Orange.evaluation.testing.crossValidation(learners, table) 
     48res = Orange.evaluation.testing.cross_validation(learners, table) 
    4749printResults(res) 
    4850 
    4951print "\nLearning curve" 
    5052prop = Orange.core.frange(0.2, 1.0, 0.2) 
    51 res = Orange.evaluation.testing.learningCurveN(learners, table, folds=5, 
     53res = Orange.evaluation.testing.learning_curve_n(learners, table, folds=5, 
    5254    proportions=prop) 
    5355for i in range(len(prop)): 
     
    6062train = table.select(indices, 0) 
    6163test = table.select(indices, 1) 
    62 res = Orange.evaluation.testing.learningCurveWithTestData(learners, train, 
     64res = Orange.evaluation.testing.learning_curve_with_test_data(learners, train, 
    6365    test, times=5, proportions=prop) 
    6466for i in range(len(prop)): 
     
    6870 
    6971print "\nLearning and testing on pre-separated data" 
    70 res = Orange.evaluation.testing.learnAndTestOnTestData(learners, train, test) 
     72res = Orange.evaluation.testing.learn_and_test_on_test_data(learners, train, test) 
    7173printResults(res) 
    7274 
    7375print "\nLearning and testing on the same data" 
    74 res = Orange.evaluation.testing.learnAndTestOnLearnData(learners, table) 
     76res = Orange.evaluation.testing.learn_and_test_on_learn_data(learners, table) 
    7577printResults(res) 
Note: See TracChangeset for help on using the changeset viewer.