(label_dict)
return f1_score
compute f1_macro
    :param label_dict: {label:(TP,FP,FN)}
    :return: f1_macro
compute f1_macro
    :param label_dict: {label:(TP,FP,FN)}
    :return: f1_macro
compute f1_macro : param label_dict : { label : ( TP FP FN ) } : return : f1_macro
def compute_f1_macro(label_dict):
    """
    compute f1_macro
    :param label_dict: {label:(TP,FP,FN)}
    :return: f1_macro
    """
    f1_dict = {}
    num_classes = len(label_dict)
    for label, tuplee in label_dict.items():
        TP, FP, FN = tuplee
        f1_score_onelabel = compute_f1(TP, FP, FN)
        f1_dict[label] = f1_score_onelabel
    f1_score_sum = 0.0
    for label, f1_score in f1_dict.items():
        f1_score_sum += f1_score
    f1_score = f1_score_sum / float(num_classes)
    return f1_score
def compute_f1_macro ( label_dict ) : f1_dict = { } num_classes = len ( label_dict ) for label , tuplee in label_dict . items ( ) : TP , FP , FN = tuplee f1_score_onelabel = compute_f1 ( TP , FP , FN ) f1_dict [ label ] = f1_score_onelabel f1_score_sum = 0.0 for label , f1_score in f1_dict . items ( ) : f1_score_sum += f1_score f1_score = f1_score_sum / float ( num_classes ) return f1_score