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/scoring-all.py

    r9372 r9823  
    66 
    77import Orange 
    8 table = Orange.data.Table("voting") 
     8voting = Orange.data.Table("voting") 
    99 
    1010def print_best_3(ma): 
     
    1313 
    1414print 'Feature scores for best three features (with score_all):' 
    15 ma = Orange.feature.scoring.score_all(table) 
     15ma = Orange.feature.scoring.score_all(voting) 
    1616print_best_3(ma) 
    1717 
     
    2020print 'Feature scores for best three features (scored individually):' 
    2121meas = Orange.feature.scoring.Relief(k=20, m=50) 
    22 mr = [ (a.name, meas(a, table)) for a in table.domain.attributes ] 
     22mr = [ (a.name, meas(a, voting)) for a in voting.domain.attributes] 
    2323mr.sort(key=lambda x: -x[1]) #sort decreasingly by the score 
    2424print_best_3(mr) 
Note: See TracChangeset for help on using the changeset viewer.