evaluation.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:PrivacyScore 作者: PrivacyScore 项目源码 文件源码
def evaluate_result(result: dict, group_order: list) -> Tuple[dict, OrderedDict]:
    """
    Evaluate and describe a complete result dictionary.

    As a result, a dictionary of the groups is returned. Each group has another
    dictionary specifying the amount of good, the amount of bad and the amount
    of neutral results as well as the overall group rating and the ratio of
    good results.
    """
    if 'reachable' in result and not result['reachable']:
        return UnrateableSiteEvaluation(), {}
    evaluated_groups = {}
    described_groups = OrderedDict()
    for group in group_order:
        if group not in CHECKS:
            continue
        evaluated_groups[group], described_groups[group] = evaluate_group(
            group, result)
    return SiteEvaluation(evaluated_groups, group_order), described_groups
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号