Ignore:
Timestamp:
02/05/12 22:37:07 (2 years ago)
Author:
umek@…
Branch:
default
rebase_source:
eb6a120705f3462186b982a698c0a7ad9f947e24
Message:

Changed table to data or name of the data set.

For example - instead of

table = Orange.data.Table("housing")

is changed to

housing = Orange.data.Table("housing")

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/code/ensemble-forest-measure.py

    r9372 r9638  
    1212for fn in files: 
    1313    print "\nDATA:" + fn + "\n" 
    14     table = Orange.data.Table(fn) 
     14    iris = Orange.data.Table(fn) 
    1515 
    1616    measure = Orange.ensemble.forest.ScoreFeature(trees=100) 
    1717 
    1818    #call by attribute index 
    19     imp0 = measure(0, table)  
     19    imp0 = measure(0, iris)  
    2020    #call by orange.Variable 
    21     imp1 = measure(table.domain.attributes[1], table) 
     21    imp1 = measure(iris.domain.attributes[1], iris) 
    2222    print "first: %0.2f, second: %0.2f\n" % (imp0, imp1) 
    2323 
     
    2626            rand=random.Random(10)) 
    2727 
    28     imp0 = measure(0, table) 
    29     imp1 = measure(table.domain.attributes[1], table) 
     28    imp0 = measure(0, iris) 
     29    imp1 = measure(iris.domain.attributes[1], iris) 
    3030    print "first: %0.2f, second: %0.2f\n" % (imp0, imp1) 
    3131 
    3232    print "All importances:" 
    33     for at in table.domain.attributes: 
    34         print "%15s: %6.2f" % (at.name, measure(at, table)) 
     33    for at in iris.domain.attributes: 
     34        print "%15s: %6.2f" % (at.name, measure(at, iris)) 
Note: See TracChangeset for help on using the changeset viewer.