'Data stopping.
If the minimum number of required covered examples can no longer
be met, return True and conclude rule induction.
Important
This function is inherently linked to the GuardianValidator. If
a different general validator is used, it is imperative that the
minimum number of required covered examples is enforced or this
function overridden. The parameter min_covered_examples must be
accessible, else an exception is raised.
Parameters
X, Y, W : ndarray
Learning data.
target_class : int
Index of the class to model.
Returns
res : bool
Whether or not rule induction will be stopped.'

def positive_remaining_data_stopping(self, X, Y, W, target_class):

    tc = target_class
    dist = get_dist(Y, W, self.domain)
    general_validator = self.rule_finder.general_validator
    num_possible = (dist[tc] if (tc is not None) else dist.sum())
    return (num_possible < general_validator.min_covered_examples)
