severity_to_weight: Map Severity to Numeric Weight

View source: R/scoring_primitives.R

severity_to_weightR Documentation

Map Severity to Numeric Weight

Description

Converts canonical severity labels to numeric penalty multipliers on a 0–1 scale.

Usage

severity_to_weight(severity)

Arguments

severity

Character vector of canonical severity values (info, low, medium, high, critical).

Details

Default mapping:

  • info = 0.00

  • low = 0.25

  • medium = 0.50

  • high = 0.75

  • critical = 1.00

Value

Numeric vector of weights.

Examples

severity_to_weight(c("low", "high", "critical"))


r4subcore documentation built on Feb. 20, 2026, 5:09 p.m.