def calculate_F_score(precision, recall, beta = None):
    """
    Calculates the F-meassure of the supplied data, using the equation as per https://en.wikipedia.org/wiki/Precision_and_recall#F-measure :
        F = (1 + beta^2) * (precision * recall)/(beta^2 * precision + recall)
        
    If the recall and precision is 0, the f-score is set to 0, as no correct true positives are in the analyzed data
    
    Input:
        precision: The precision value of the data
        recall: The recall value of the data
        beta: A weight parameter of the F-Meassure. Default is None, which defaults to the F1 meassure. Should only be set to float values
        
    Output:
        F: The F meassure value of the supplied valies
    """
    
    if precision is None:
        return None
    if recall is None:
        return None
    if (precision + recall) == 0:
        return 0
    elif beta is None:
        F = 2 * (precision * recall) / (precision + recall)
    else:
        F = (1 + beta**2) * (precision * recall) / (beta**2 * precision + recall)

    return F