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/statExample0.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) 
Note: See TracChangeset for help on using the changeset viewer.