Comparison
A comparison: two results for the same thing, their difference, the tolerance that judges it and the verdict. Validation runs, monitoring against prediction and conformance tests use it.
https://opendevelopmentstandards.org/schema/1.0.0-rc.2/core/Comparison.json
Fields
idtextnot emptyThe record's id: unique within the document.
resultRequiredThe result under test.
benchmarkRequiredThe result it is judged against.
measureOne ofthe codes belowHow the difference is taken.
difference- The result less the benchmark.
absolute_difference- The size of the result less the benchmark.
relative_difference- The result less the benchmark, divided by the size of the benchmark.
complex_relative_difference- The size of the complex result less the complex benchmark, divided by the size of the benchmark.
differenceThe difference, summed up by its statistic, such as the largest absolute difference across bands.
judgedwhole numberat least 0How many elements were compared.
selectiontextWhich elements were compared, when not all, such as the rule that skips interference minima.
toleranceThe largest difference that passes.
basisWhere the tolerance comes from.
verdictRequiredOne ofthe codes belowThe outcome.
pass- The difference is within the tolerance.
fail- The difference is outside the tolerance.
not_judged- No tolerance applies, or too few elements could be compared.
reported- The difference is recorded for information only.
- When
verdictisnot_judged, it may leave outdifference; otherwise it needsdifference.
Links
Points at Records whose ids this record holds, with the field that holds each.
Held by Records that embed this one, with their field that holds it.
Examples
An id that another example defines opens that record.
Example 1
{
"id": "comparison-1",
"result": "evidence-predicted-night",
"benchmark": "evidence-night-survey",
"measure": "absolute_difference",
"difference": {
"amount": 1.4,
"unit": "dB"
},
"judged": 1,
"tolerance": {
"amount": 2,
"unit": "dB"
},
"basis": {
"title": "Model validation plan, Wellsite 04-12",
"section": "3"
},
"verdict": "pass"
}Show 1 more exampleHide the other example
Example 2
{
"result": "evidence-predicted-night",
"benchmark": "evidence-night-survey",
"measure": "difference",
"judged": 0,
"selection": "Survey samples while the compressor idled: none",
"verdict": "not_judged"
}Changes and file
Changes
- 0.1.0 First version.
Schema file
Show the JSON SchemaHide the JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://opendevelopmentstandards.org/schema/1.0.0-rc.2/core/Comparison.json",
"title": "Comparison",
"description": "A comparison: two results for the same thing, their difference, the tolerance that judges it and the verdict. Validation runs, monitoring against prediction and conformance tests use it.",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "The record's id: unique within the document."
},
"result": {
"type": "string",
"minLength": 1,
"x-ods-ref": "Evidence",
"description": "The result under test."
},
"benchmark": {
"type": "string",
"minLength": 1,
"x-ods-ref": "Evidence",
"description": "The result it is judged against."
},
"measure": {
"type": "string",
"enum": [
"difference",
"absolute_difference",
"relative_difference",
"complex_relative_difference"
],
"description": "How the difference is taken.",
"x-ods-options": [
{
"value": "difference",
"title": "Difference",
"description": "The result less the benchmark."
},
{
"value": "absolute_difference",
"title": "Absolute difference",
"description": "The size of the result less the benchmark."
},
{
"value": "relative_difference",
"title": "Relative difference",
"description": "The result less the benchmark, divided by the size of the benchmark."
},
{
"value": "complex_relative_difference",
"title": "Complex relative difference",
"description": "The size of the complex result less the complex benchmark, divided by the size of the benchmark."
}
]
},
"difference": {
"$ref": "Value.json",
"description": "The difference, summed up by its statistic, such as the largest absolute difference across bands."
},
"judged": {
"type": "integer",
"minimum": 0,
"description": "How many elements were compared."
},
"selection": {
"type": "string",
"description": "Which elements were compared, when not all, such as the rule that skips interference minima."
},
"tolerance": {
"$ref": "Value.json",
"description": "The largest difference that passes."
},
"basis": {
"$ref": "Citation.json",
"description": "Where the tolerance comes from."
},
"verdict": {
"type": "string",
"enum": [
"pass",
"fail",
"not_judged",
"reported"
],
"description": "The outcome.",
"x-ods-options": [
{
"value": "pass",
"title": "Pass",
"description": "The difference is within the tolerance."
},
{
"value": "fail",
"title": "Fail",
"description": "The difference is outside the tolerance."
},
{
"value": "not_judged",
"title": "Not judged",
"description": "No tolerance applies, or too few elements could be compared."
},
{
"value": "reported",
"title": "Reported",
"description": "The difference is recorded for information only."
}
]
}
},
"required": [
"result",
"benchmark",
"verdict"
],
"allOf": [
{
"if": {
"properties": {
"verdict": {
"const": "not_judged"
}
},
"required": [
"verdict"
]
},
"else": {
"properties": {
"difference": true
},
"required": [
"difference"
]
}
}
],
"patternProperties": {
"^x-": {}
},
"unevaluatedProperties": false,
"examples": [
{
"id": "comparison-1",
"result": "evidence-predicted-night",
"benchmark": "evidence-night-survey",
"measure": "absolute_difference",
"difference": {
"amount": 1.4,
"unit": "dB"
},
"judged": 1,
"tolerance": {
"amount": 2,
"unit": "dB"
},
"basis": {
"title": "Model validation plan, Wellsite 04-12",
"section": "3"
},
"verdict": "pass"
},
{
"result": "evidence-predicted-night",
"benchmark": "evidence-night-survey",
"measure": "difference",
"judged": 0,
"selection": "Survey samples while the compressor idled: none",
"verdict": "not_judged"
}
],
"x-ods-status": "draft",
"x-ods-kind": "part",
"x-ods-module": "core",
"x-ods-changes": {
"0.1.0": "First version."
}
}