Ignore:
Timestamp:
01/06/13 00:27:59 (16 months ago)
Author:
blaz <blaz.zupan@…>
Branch:
default
Message:

new tutorial

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/tutorial/rst/code/fss6.py

    r9787 r11051  
    66# Referenced:  o_fss.htm 
    77 
    8 import orange, orngFSS 
    9 data = orange.ExampleTable("adult_sample.tab") 
     8import orngFSS 
     9import Orange 
     10data = Orange.data.Table("adult_sample.tab") 
    1011 
    1112def report_relevance(data): 
    12   m = orngFSS.attMeasure(data) 
     13  m = Orange.feature.scoring.score_all(data) 
    1314  for i in m: 
    1415    print "%5.3f %s" % (i[1], i[0]) 
     
    1617print "Before feature subset selection (%d attributes):" % len(data.domain.attributes) 
    1718report_relevance(data) 
    18 data = orange.ExampleTable("adult_sample.tab") 
     19data = Orange.data.Table("adult_sample.tab") 
    1920 
    2021marg = 0.01 
    21 filter = orngFSS.FilterRelief(margin=marg) 
     22filter = Orange.feature.selection.FilterRelief(margin=marg) 
    2223ndata = filter(data) 
    2324print "\nAfter feature subset selection with margin %5.3f (%d attributes):" % (marg, len(ndata.domain.attributes)) 
Note: See TracChangeset for help on using the changeset viewer.