示例#1
0
def cforange_filter_relieff(input_dict):
    import orange
    import orngFSS
    data = input_dict['dataset']
    measure = orange.MeasureAttribute_relief(k=int(input_dict['k']), m=int(input_dict['m']))
    margin = float(input_dict['margin'])
    new_dataset = orngFSS.filterRelieff(data,measure,margin)
    output_dict = {}
    output_dict['new_dataset'] = new_dataset
    return output_dict   
示例#2
0
# Description: Recursively eliminates attributes using Relief measure, until
#              the estimate relevants of all attributes is beyond certain threshold.
#              Makes use of filterRelieff from orngFSS
# Category:    preprocessing
# Uses:        voting.tab
# Referenced:  orngFSS.htm

import orange, orngFSS

def report_relevance(data):
  m = orngFSS.attMeasure(data)
  for i in m:
    print "%5.3f %s" % (i[1], i[0])

data = orange.ExampleTable("../datasets/adult_sample")
print "Before feature subset selection:"; report_relevance(data)

marg = 0.01
ndata = orngFSS.filterRelieff(data, margin=marg)
print "\nAfter feature subset selection with margin %5.3f:" % marg
report_relevance(ndata)
示例#3
0
# Description: Recursively eliminates attributes using Relief measure, until
#              the estimate relevants of all attributes is beyond certain threshold.
#              Makes use of filterRelieff from orngFSS
# Category:    preprocessing
# Uses:        voting.tab
# Referenced:  orngFSS.htm

import orange, orngFSS


def report_relevance(data):
    m = orngFSS.attMeasure(data)
    for i in m:
        print "%5.3f %s" % (i[1], i[0])


data = orange.ExampleTable("../datasets/adult_sample")
print "Before feature subset selection:"
report_relevance(data)

marg = 0.01
ndata = orngFSS.filterRelieff(data, margin=marg)
print "\nAfter feature subset selection with margin %5.3f:" % marg
report_relevance(ndata)