(self, data)
Discretize continuous attributes.
        Return None when there is no data, no rows, or no primitive attributes.
Discretize continuous attributes.
        Return None when there is no data, no rows, or no primitive attributes.
Discretize continuous attributes . Return None when there is no data no rows or no primitive attributes .
def _get_discrete_data(self, data):
        """
        Discretize continuous attributes.
        Return None when there is no data, no rows, or no primitive attributes.
        """
        if (data is None or
                not len(data) or
                not any(attr.is_discrete or attr.is_continuous
                        for attr in chain(data.domain.variables,
                                          data.domain.metas))):
            return None
        elif any(attr.is_continuous for attr in data.domain.variables):
            return Discretize(
                method=EqualFreq(n=4),
                remove_const=False,
                discretize_classes=True,
                discretize_metas=True)(data)
        else:
            return data
def _get_discrete_data ( self , data ) : if ( data is None or not len ( data ) or not any ( attr . is_discrete or attr . is_continuous for attr in chain ( data . domain . variables , data . domain . metas ) ) ) : return None elif any ( attr . is_continuous for attr in data . domain . variables ) : return Discretize ( method = EqualFreq ( n = 4 ) , remove_const = False , discretize_classes = True , discretize_metas = True ) ( data ) else : return data