Ignore:
Timestamp:
02/06/12 20:01:02 (2 years ago)
Author:
lanumek
Branch:
default
Children:
9835:e48466fc6eb2, 9841:05a160804431
rebase_source:
8cf30121654f25c9cb6d8ac9bdaf163e305d62da
Message:

Changed names of data sets (table replaced with data or name of the data set).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/code/misc-selection-bestonthefly.py

    r9372 r9823  
    77import Orange 
    88 
    9 table = Orange.data.Table("lymphography") 
     9lymphography = Orange.data.Table("lymphography") 
    1010 
    1111find_best = Orange.misc.selection.BestOnTheFly(call_compare_on_1st = True) 
    1212 
    13 for attr in table.domain.attributes: 
    14     find_best.candidate((Orange.feature.scoring.GainRatio(attr, table), attr)) 
     13for attr in lymphography.domain.attributes: 
     14    find_best.candidate((Orange.feature.scoring.GainRatio(attr, lymphography), attr)) 
    1515 
    1616print "%5.3f: %s" % find_best.winner() 
     
    1818find_best = Orange.misc.selection.BestOnTheFly(Orange.misc.selection.compare_first_bigger) 
    1919 
    20 for attr in table.domain.attributes: 
    21     find_best.candidate((Orange.feature.scoring.GainRatio(attr, table), attr)) 
     20for attr in lymphography.domain.attributes: 
     21    find_best.candidate((Orange.feature.scoring.GainRatio(attr, lymphography), attr)) 
    2222 
    2323print "%5.3f: %s" % find_best.winner() 
     
    2525find_best = Orange.misc.selection.BestOnTheFly() 
    2626 
    27 for attr in table.domain.attributes: 
    28     find_best.candidate(Orange.feature.scoring.GainRatio(attr, table)) 
     27for attr in lymphography.domain.attributes: 
     28    find_best.candidate(Orange.feature.scoring.GainRatio(attr, lymphography)) 
    2929 
    3030best_index = find_best.winner_index() 
    31 print "%5.3f: %s" % (find_best.winner(), table.domain[best_index]) 
     31print "%5.3f: %s" % (find_best.winner(), lymphography.domain[best_index]) 
Note: See TracChangeset for help on using the changeset viewer.