def selectivity_formula(counts):
    """Return selectivity
    
    counts: dict of counts, containing at least TP, FP, and FP_COMP
    """
    tp = counts['TP']
    fp = counts['FP']
    fp_comp = counts['FP_COMP']
    
    if not tp and fp==fp_comp:
        return 0.0

    selectivity = tp/(tp + (fp - fp_comp))
    return selectivity