'Cover and remove.
After covering a learning instance, remove it from further
consideration.
Parameters
X, Y, W : ndarray
Learning data.
new_rule : Rule
Remove learning instances covered by this rule.
Returns
X, Y, W : ndarray
Learning data subset.'

@staticmethod
def exclusive_cover_and_remove(X, Y, W, new_rule):

    examples_to_keep = new_rule.covered_examples.copy()
    if (new_rule.target_class is not None):
        examples_to_keep &= (Y == new_rule.target_class)
    examples_to_keep = np.logical_not(examples_to_keep)
    W = (W[examples_to_keep] if (W is not None) else None)
    return (X[examples_to_keep], Y[examples_to_keep], W)
