def fscore_from_sed_eval_metrics(sed_eval_metrics):
    """extract class-wise and averaged fscores, precisions and recalls from
    sed_eval metrics object

    Args:
        sed_eval_metrics:

    Returns:
        fscore (dict of float): fscore values
        precision (dict of float): precision values
        recall (dict of float): recall values

    """
    f = {}
    p = {}
    r = {}
    sed_eval_results_classwise = sed_eval_metrics.results_class_wise_metrics()
    for key in sed_eval_results_classwise:
        f[key] = sed_eval_results_classwise[key]['f_measure']['f_measure']
        p[key] = sed_eval_results_classwise[key]['f_measure']['precision']
        r[key] = sed_eval_results_classwise[key]['f_measure']['recall']
    sed_eval_results_macro = sed_eval_metrics.results_class_wise_average_metrics()
    f['macro_average'] = sed_eval_results_macro['f_measure']['f_measure']
    p['macro_average'] = sed_eval_results_macro['f_measure']['precision']
    r['macro_average'] = sed_eval_results_macro['f_measure']['recall']
    sed_eval_results_micro = sed_eval_metrics.results_overall_metrics()
    f['micro_average'] = sed_eval_results_micro['f_measure']['f_measure']
    p['micro_average'] = sed_eval_results_micro['f_measure']['precision']
    r['micro_average'] = sed_eval_results_micro['f_measure']['recall']
    return f, p, r