def _IREP_prune_metric_cn(cn, rule, pos_idxs, neg_idxs):
    """Returns the prune value of a candidate Rule."""
    P = len(pos_idxs)
    N = len(neg_idxs)
    p = len(cn.rule_covers(rule, pos_idxs))
    n = len(cn.rule_covers(rule, neg_idxs))
    return (p + (N - n)) / (P + N)
