def __call__(self, data):
        pp = Preprocessor_discretize(attributes=self.features, discretizeClass=self.discretize_class)
        pp.method = self.method
        ddata = pp(data)

        if self.clean:
            return ddata.select([x for x in ddata.domain.features if len(x.values)>1] + [ddata.domain.classVar])
        else:
            return ddata
Exemple #2
0
    def __call__(self, data):
        pp = Preprocessor_discretize(attributes=self.features,
                                     discretizeClass=self.discretize_class)
        pp.method = self.method
        ddata = pp(data)

        if self.clean:
            return ddata.select(
                [x for x in ddata.domain.features if len(x.values) > 1] +
                [ddata.domain.classVar])
        else:
            return ddata
    def __call__(self, data):
        pp = Preprocessor_discretize(attributes=self.features,
                                     discretize_class=self.discretize_class)
        pp.method = self.method
        ddata = pp(data)

        if self.clean:
            features = [x for x in ddata.domain.features if len(x.values) > 1]
            domain = Orange.data.Domain(features, ddata.domain.class_var,
                                        class_vars=ddata.domain.class_vars)
            return Orange.data.Table(domain, ddata)
        else:
            return ddata
Exemple #4
0
    def __call__(self, data):
        pp = Preprocessor_discretize(attributes=self.features,
                                     discretize_class=self.discretize_class)
        pp.method = self.method
        ddata = pp(data)

        if self.clean:
            features = [x for x in ddata.domain.features if len(x.values) > 1]
            domain = Orange.data.Domain(features,
                                        ddata.domain.class_var,
                                        class_vars=ddata.domain.class_vars)
            return Orange.data.Table(domain, ddata)
        else:
            return ddata