Changeset 7643:5e8ba654cf70 in orange


Ignore:
Timestamp:
02/10/11 15:35:14 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
59804dc5e5f3f8d09bd1e7014cf4cf8abb2ba855
Message:
 
Location:
orange/doc/ofb-rst/code
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • orange/doc/ofb-rst/code/bagging_test.py

    r6866 r7643  
    66 
    77import orange, orngTree, orngStat, orngTest, orngStat, bagging 
    8 data = orange.ExampleTable("../datasets/adult_sample") 
     8data = orange.ExampleTable("../../datasets/adult_sample") 
    99 
    1010tree = orngTree.TreeLearner(mForPrunning=10, minExamples=30) 
  • orange/doc/ofb-rst/code/data_characteristics.py

    r6866 r7643  
    55 
    66import orange 
    7 data = orange.ExampleTable("../datasets/adult_sample") 
     7data = orange.ExampleTable("../../datasets/adult_sample") 
    88print "Classes:", len(data.domain.classVar.values) 
    99print "Attributes:", len(data.domain.attributes), ",", 
  • orange/doc/ofb-rst/code/data_characteristics2.py

    r6866 r7643  
    55 
    66import orange 
    7 data = orange.ExampleTable("../datasets/adult_sample") 
     7data = orange.ExampleTable("../../datasets/adult_sample") 
    88print "Classes:", len(data.domain.classVar.values) 
    99print "Attributes:", len(data.domain.attributes), ",", 
  • orange/doc/ofb-rst/code/data_characteristics3.py

    r6866 r7643  
    66 
    77import orange 
    8 data = orange.ExampleTable("../datasets/adult_sample") 
     8data = orange.ExampleTable("../../datasets/adult_sample") 
    99 
    1010print "Continuous attributes:" 
  • orange/doc/ofb-rst/code/data_characteristics4.py

    r6866 r7643  
    55 
    66import orange 
    7 data = orange.ExampleTable("../datasets/adult_sample") 
     7data = orange.ExampleTable("../../datasets/adult_sample") 
    88dist = orange.DomainDistributions(data) 
    99 
  • orange/doc/ofb-rst/code/disc1.py

    r6866 r7643  
    1212    print "%s/%d: %s" % (a.name, len(a.values), reduce(lambda x,y: x+', '+y, [i for i in a.values])) 
    1313         
    14 data = orange.ExampleTable("../datasets/wdbc") 
     14data = orange.ExampleTable("../../datasets/wdbc") 
    1515print '%d features in original data set, discretized:' % len(data.domain.attributes) 
    1616data_ent = orange.Preprocessor_discretize(data, method=orange.EntropyDiscretization()) 
  • orange/doc/ofb-rst/code/domain12.py

    r6866 r7643  
    66 
    77import orange 
    8 data = orange.ExampleTable('../datasets/car') 
     8data = orange.ExampleTable('../../datasets/car') 
    99 
    1010# add attribute price = f(buying, maint) 
  • orange/doc/ofb-rst/code/domain4.py

    r6866 r7643  
    1414  print "p(%s)=%5.3f" % (data.domain.classVar.values[0], float(n)/len(data)) 
    1515 
    16 filename = "../datasets/adult_sample.tab" 
     16filename = "../../datasets/adult_sample.tab" 
    1717data = orange.ExampleTable(filename) 
    1818report_prob('original data set', data) 
  • orange/doc/ofb-rst/code/domain5.py

    r6866 r7643  
    1818    print 
    1919 
    20 filename = "../datasets/adult_sample.tab" 
     20filename = "../../datasets/adult_sample.tab" 
    2121data = orange.ExampleTable(filename) 
    2222report_prob('data', data) 
  • orange/doc/ofb-rst/code/domain6.py

    r6866 r7643  
    1818    print 
    1919 
    20 filename = "../datasets/adult_sample.tab" 
     20filename = "../../datasets/adult_sample.tab" 
    2121data = orange.ExampleTable(filename) 
    2222report_prob('data', data) 
  • orange/doc/ofb-rst/code/domain7.py

    r6866 r7643  
    1717    print 
    1818 
    19 filename = "../datasets/adult_sample.tab" 
     19filename = "../../datasets/adult_sample.tab" 
    2020data = orange.ExampleTable(filename) 
    2121report_prob('data', data) 
  • orange/doc/ofb-rst/code/fss6.py

    r6866 r7643  
    77 
    88import orange, orngFSS 
    9 data = orange.ExampleTable("../datasets/adult_sample") 
     9data = orange.ExampleTable("../../datasets/adult_sample") 
    1010 
    1111def report_relevance(data): 
     
    1616print "Before feature subset selection (%d attributes):" % len(data.domain.attributes) 
    1717report_relevance(data) 
    18 data = orange.ExampleTable("../datasets/adult_sample") 
     18data = orange.ExampleTable("../../datasets/adult_sample") 
    1919 
    2020marg = 0.01 
  • orange/doc/ofb-rst/code/fss7.py

    r6866 r7643  
    1414import orange, orngDisc, orngTest, orngStat, orngFSS 
    1515 
    16 data = orange.ExampleTable("../datasets/crx") 
     16data = orange.ExampleTable("../../datasets/crx") 
    1717 
    1818bayes = orange.BayesLearner() 
  • orange/doc/ofb-rst/code/regression1.py

    r6866 r7643  
    77import orange, orngTree 
    88 
    9 data = orange.ExampleTable("../datasets/housing.tab") 
     9data = orange.ExampleTable("housing") 
    1010rt = orngTree.TreeLearner(data, measure="retis", mForPruning=2, minExamples=20) 
    1111orngTree.printTxt(rt, leafStr="%V %I") 
  • orange/doc/ofb-rst/code/regression2.py

    r6866 r7643  
    77import orange, orngTree, orngTest, orngStat 
    88 
    9 data = orange.ExampleTable("../datasets/housing.tab") 
     9data = orange.ExampleTable("housing.tab") 
    1010selection = orange.MakeRandomIndices2(data, 0.5) 
    1111train_data = data.select(selection, 0) 
  • orange/doc/ofb-rst/code/regression3.py

    r6866 r7643  
    77import orange, orngTree, orngTest, orngStat 
    88 
    9 data = orange.ExampleTable("../datasets/housing.tab") 
     9data = orange.ExampleTable("housing.tab") 
    1010 
    1111maj = orange.MajorityLearner() 
     
    1818learners = [maj, rt, knn] 
    1919 
    20 data = orange.ExampleTable("../datasets/housing.tab") 
     20data = orange.ExampleTable("housing.tab") 
    2121results = orngTest.crossValidation(learners, data, folds=10) 
    2222mse = orngStat.MSE(results) 
  • orange/doc/ofb-rst/code/report_missing.py

    r6866 r7643  
    55 
    66import orange 
    7 data = orange.ExampleTable("../datasets/adult_sample") 
     7data = orange.ExampleTable("../../datasets/adult_sample") 
    88 
    99natt = len(data.domain.attributes) 
  • orange/doc/ofb-rst/code/sample_adult.py

    r6866 r7643  
    66 
    77import orange 
    8 data = orange.ExampleTable("../datasets/adult_sample") 
     8data = orange.ExampleTable("../../datasets/adult_sample") 
    99selection = orange.MakeRandomIndices2(data, 0.03) 
    1010sample = data.select(selection, 0) 
Note: See TracChangeset for help on using the changeset viewer.