188.8.131.52 Mapping of Severity to scores.
XJDF provides a generic scoring or severity attribute with a restricted range of [0-100]. Typically scoring systems will have a reduced number of levels and may be ordered in reverse. Applications should map the internal score to the required scores by rounding the XJDF value to the number of requested grades. A lower @Severity value of 0 is always "better" than a higher @Severity value.
Example: Mapping of Severity to 15415 and 15416 barcode quality
Table 6.146: QualityControlParams Resource
|Severity?||integer||Severity SHALL define the maximum allowed overall severity of all defects on a scale of 0(no defects present) over 1(trivial) to 100 (fatally severe).
See also ##ref 184.108.40.206
Table 6.147: QualityControlResult Resource
|Severity?||integer||Severity SHALL define the overall severity of all defects on a scale of 0(no defects present) over 1(trivial) to 100 (fatally severe).
See also ##ref 220.127.116.11
============= draft 2 ===============
18.104.22.168 Mapping severity to scores
XJDF provides a generic scoring of quality using the @Severity attribute which is an integer data type and has a restricted range of [0-100].
Typically, quality scoring systems will have their own levels and ordering of results and these SHOULD be mapped to a
value in @Severity. This may will typically require mapping multiple @Severity values to a quality score.
When writing a score as a severity, the following mapping shall be applied:
Highest quality: Severity=0
Lowest Quality: Severity=100
All others=(200*position of score +100)/(2* number of scores)
When reading a severity and translating to a score:
position of score=(Severity * (number of scores))/101
Note: the score positions are zero based and the mapping of positions to the named scores is left as an exercise for the reader.
Note: the algorithms above ensure that Severity=0 is always mapped to the highest score, Severity=100 is always mapped to the lowest score and that all other positions are close to the center of the valid score range.
Note: A low @Severity value of "0" shall always represents a better quality than higher @Severity values.
22.214.171.124 Example severity for barcodes
The following table shows how the barcode quality grades as defined in [ISO15415:2011] and [ISO15416:2016] could
be mapped to @Severity in QualityControlParams and QualityControlResult.
<update table column @Severity value to 0, 30, 50, 70, 100
add column @Severity range 0-20,21-40,41-60,61-80, 81-100 />