Comparison

PartDraftv1.0.0-rc.2

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

  • id
    textnot empty

    The record's id: unique within the document.

  • resultRequired

    The result under test.

  • benchmarkRequired

    The result it is judged against.

  • measure
    One ofthe codes below

    How 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.
  • difference

    The difference, summed up by its statistic, such as the largest absolute difference across bands.

  • judged
    whole numberat least 0

    How many elements were compared.

  • selection
    text

    Which elements were compared, when not all, such as the rule that skips interference minima.

  • tolerance

    The largest difference that passes.

  • basis

    Where the tolerance comes from.

  • verdictRequired
    One ofthe codes below

    The 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 verdict is not_judged, it may leave out difference; otherwise it needs difference.

Links

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 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

  1. 0.1.0 First version.

Schema file

Show 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."
  }
}