def __new__(cls, data=None, measure=orange.MeasureAttribute_relief(k=20, m=50), threshold=0.0): if data is None: self = object.__new__(cls) return self else: self = cls(measure=measure, threshold=threshold) return self(data)
def __new__(cls, data=None, measure=orange.MeasureAttribute_relief(k=20, m=50), margin=0): if data is None: self = object.__new__(cls) return self else: self = cls(measure=measure, margin=margin) return self(data)
def select_relief(data, measure=orange.MeasureAttribute_relief(k=20, m=50), margin=0): """Iteratively remove the worst scored feature until no feature has a score below the margin. The filter procedure was originally designed for measures such as Relief, which are context dependent, i.e., removal of features may change the scores of other remaining features. The score is thus recomputed in each iteration. :param data: a data table :type data: :obj:`Orange.data.Table` :param measure: a feature scorer :type measure: :obj:`Orange.feature.scoring.Score` :param margin: margin for removal :type margin: float """ measl = score_all(data, measure) while len(data.domain.attributes) > 0 and measl[-1][1] < margin: data = select_best_n(data, measl, len(data.domain.attributes) - 1) measl = score_all(data, measure) return data
def __init__(self, measure=orange.MeasureAttribute_relief(k=20, m=50), margin=0): self.measure = measure self.margin = margin
def __init__(self, measure=orange.MeasureAttribute_relief(k=20, m=50), n=5): self.measure = measure self.n = n
def __init__(self, measure=orange.MeasureAttribute_relief(k=20, m=50), \ threshold=0.0): self.measure = measure self.threshold = threshold