def precision(y_true, y_pred):
    """
    Calculates the precision.

    Precision (also called positive predictive value) expresses the probability