def _accuracy(object, pos_pruneset, neg_pruneset):
    """Calculate accuracy value of object's classification.

    object : Cond, Rule, or Ruleset
    """
    P = len(pos_pruneset)
    N = len(neg_pruneset)
    if P + N == 0:
        return None
    tp = len(object.covers(pos_pruneset))
    tn = N - len(object.covers(neg_pruneset))
    return (tp + tn) / (P + N)
