(self, data)
return data.transform(domain)
Compute and apply discretization of the given data. Returns a new
        data table.

        Parameters
        ----------
        data : Orange.data.Table
            A data table to be discretized.
Compute and apply discretization of the given data. Returns a new
        data table.
Compute and apply discretization of the given data . Returns a new data table .
def __call__(self, data):
        """
        Compute and apply discretization of the given data. Returns a new
        data table.

        Parameters
        ----------
        data : Orange.data.Table
            A data table to be discretized.
        """

        def transform(var):
            if var.is_continuous:
                new_var = method(data, var)
                if new_var is not None and \
                        (len(new_var.values) >= 2 or not self.remove_const):
                    return new_var
                else:
                    return None
            else:
                return var

        def discretized(vars_, do_discretize):
            if do_discretize:
                vars_ = (transform(var) for var in vars_)
                vars_ = [var for var in vars_ if var is not None]
            return vars_

        method = self.method or discretize.EqualFreq()
        domain = Orange.data.Domain(
            discretized(data.domain.attributes, True),
            discretized(data.domain.class_vars, self.discretize_classes),
            discretized(data.domain.metas, self.discretize_metas))
        return data.transform(domain)
def __call__ ( self , data ) : def transform ( var ) : if var . is_continuous : new_var = method ( data , var ) if new_var is not None and ( len ( new_var . values ) >= 2 or not self . remove_const ) : return new_var else : return None else : return var def discretized ( vars_ , do_discretize ) : if do_discretize : vars_ = ( transform ( var ) for var in vars_ ) vars_ = [ var for var in vars_ if var is not None ] return vars_ method = self . method or discretize . EqualFreq ( ) domain = Orange . data . Domain ( discretized ( data . domain . attributes , True ) , discretized ( data . domain . class_vars , self . discretize_classes ) , discretized ( data . domain . metas , self . discretize_metas ) ) return data . transform ( domain )