def calculate_discrete_classifier_point(instances, threshold):
    """
    From a list of instances, calculate the coordinates for a discrete classifier
    that uses the given threshold.
    """

    TP = 0  # True positives
    FP = 0  # False positives
    P = 0  # Total positives
    N = 0  # Total negatives
    for label, score in instances:
        if label == 'p':
            P += 1
            # Is it classified as positive?
            if score >= threshold:
                TP += 1
        else:
            N += 1
            # Is it classified as positive? Even though it is not!
            if score >= threshold:
                FP += 1
    tp_rate = TP / P
    fp_rate = FP / N
    return (fp_rate, tp_rate)