def non_redundant(self, rule, new_rule):
        '''
        Is the rule non-redundant compared to its immediate generalization?
        '''
        if rule.score < new_rule.score:
            return False

        if rule.target_type == Example.Ranked:
            return True
        else:
            return not is_redundant(rule, new_rule)
dataset/ETHPy150Open anzev/hedwig/hedwig/learners/learner.py/Learner.non_redundant/swapped operands of `<`