-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscoring.py
More file actions
82 lines (79 loc) · 2.04 KB
/
Copy pathscoring.py
File metadata and controls
82 lines (79 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
"""Objective dimension-based scoring system facade."""
from __future__ import annotations
from engine._scoring.detection import (
detector_pass_rate,
detector_stats_by_mode,
merge_potentials,
)
from engine._scoring.policy.core import (
CONFIDENCE_WEIGHTS,
DETECTOR_SCORING_POLICIES,
DIMENSIONS,
FILE_BASED_DETECTORS,
HOLISTIC_MULTIPLIER,
HOLISTIC_POTENTIAL,
MECHANICAL_DIMENSION_WEIGHTS,
MECHANICAL_WEIGHT_FRACTION,
MIN_SAMPLE,
SCORING_MODES,
SECURITY_EXCLUDED_ZONES,
SUBJECTIVE_CHECKS,
SUBJECTIVE_DIMENSION_WEIGHTS,
SUBJECTIVE_TARGET_MATCH_TOLERANCE,
SUBJECTIVE_WEIGHT_FRACTION,
TIER_WEIGHTS,
DetectorScoringPolicy,
Dimension,
ScoreMode,
matches_target_score,
register_scoring_policy,
)
from engine._scoring.results.core import (
ScoreBundle,
compute_dimension_scores,
compute_dimension_scores_by_mode,
compute_health_breakdown,
compute_health_score,
compute_score_bundle,
compute_score_impact,
get_dimension_for_detector,
)
from engine._scoring.subjective.core import DISPLAY_NAMES
__all__ = [
# Constants
"CONFIDENCE_WEIGHTS",
"DETECTOR_SCORING_POLICIES",
"DIMENSIONS",
"DISPLAY_NAMES",
"FILE_BASED_DETECTORS",
"HOLISTIC_MULTIPLIER",
"HOLISTIC_POTENTIAL",
"MECHANICAL_DIMENSION_WEIGHTS",
"MECHANICAL_WEIGHT_FRACTION",
"MIN_SAMPLE",
"SCORING_MODES",
"SECURITY_EXCLUDED_ZONES",
"SUBJECTIVE_CHECKS",
"SUBJECTIVE_DIMENSION_WEIGHTS",
"SUBJECTIVE_TARGET_MATCH_TOLERANCE",
"SUBJECTIVE_WEIGHT_FRACTION",
"TIER_WEIGHTS",
# Types
"DetectorScoringPolicy",
"Dimension",
"ScoreBundle",
"ScoreMode",
# Functions
"compute_dimension_scores",
"compute_dimension_scores_by_mode",
"compute_health_breakdown",
"compute_health_score",
"compute_score_bundle",
"compute_score_impact",
"detector_pass_rate",
"detector_stats_by_mode",
"get_dimension_for_detector",
"matches_target_score",
"merge_potentials",
"register_scoring_policy",
]