Ignore:
Timestamp:
02/07/12 19:26:14 (2 years ago)
Author:
markotoplak
Branch:
default
rebase_source:
42219203d685928c8bb777610c858b7cc732a968
Message:

Modernized some example scripts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/code/statExample1.py

    r9372 r9945  
    1 import orange, orngTest, orngTree 
     1import Orange 
    22 
    3 learners = [orange.BayesLearner(name = "bayes"), 
    4             orngTree.TreeLearner(name="tree"), 
    5             orange.MajorityLearner(name="majrty")] 
     3learners = [ Orange.classification.bayes.NaiveLearner(name = "bayes"), 
     4             Orange.classification.tree.TreeLearner(name="tree"), 
     5             Orange.classification.majority.MajorityLearner(name="majrty")] 
    66 
    7 voting = orange.ExampleTable("voting") 
    8 res = orngTest.crossValidation(learners, voting) 
     7voting = Orange.data.Table("voting") 
     8res = Orange.evaluation.testing.cross_validation(learners, voting) 
    99 
    10 vehicle = orange.ExampleTable("vehicle") 
    11 resVeh = orngTest.crossValidation(learners, vehicle) 
     10vehicle = Orange.data.Table("vehicle") 
     11resVeh = Orange.evaluation.testing.cross_validation(learners, vehicle) 
    1212 
    1313import orngStat 
    1414 
    15 CAs = orngStat.CA(res) 
    16 APs = orngStat.AP(res) 
    17 Briers = orngStat.BrierScore(res) 
    18 ISs = orngStat.IS(res) 
     15CAs = Orange.evaluation.scoring.CA(res) 
     16APs = Orange.evaluation.scoring.AP(res) 
     17Briers = Orange.evaluation.scoring.Brier_score(res) 
     18ISs = Orange.evaluation.scoring.IS(res) 
    1919 
    2020print 
Note: See TracChangeset for help on using the changeset viewer.