def calc_f1(precision, recall):
    """
    Compute F1 metric from the score dictionary

    inputs:
        precision   float with the precision value
        recall      float with the recall value
    
    output: 
        f1   float with the F1 value

    """
    f1 = (2 * precision * recall) / (precision + recall)
    return f1