Skip to content

Main content

Hierarchical Label Parent Constraint Pair Tool

Compute hierarchical label parent constraint pair from explicit bounded inputs.

Loading tool…

Description

Check a selected child label's parent implication.

Multilabel predictions can be compared as literal sets or checked against a supplied hierarchy edge. Subset inclusion, exact set equality and distance through an asserted ancestor answer different questions; a local check need not verify label meaning or the complete hierarchy.

Check a selected child label's parent implication.

When to use this tool

Use Hierarchical Label Parent Constraint Pair when checking the stated label-set or parent/ancestor constraint.

How to use the tool and how it works

  1. Enter childSelected, parentSelected. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read valid, violation. Inspect valid, violation before interpreting the associated values.

Check a selected child label's parent implication. valid = !childSelected || parentSelected, violation = childSelected && !parentSelected.1

Input fieldMeaning and unitsAccepted input
childSelectedChild SelectedRequired. Boolean.
parentSelectedParent SelectedRequired. Boolean.
Output fieldInterpretationReturned shape
validWhether this local input/result condition holds; inspect the limitations before treating it as full validation.Required. Boolean.
violationViolationRequired. Boolean.
json
{
  "input": {
    "childSelected": true,
    "parentSelected": false
  },
  "output": {
    "valid": false,
    "violation": true
  }
}

Limitations and assumptions

  • This is one supplied hierarchy edge, not validation of an actual taxonomy, all ancestors or semantic consistency.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Validate the label vocabulary and complete hierarchy, and choose dataset-level set or hierarchical metrics appropriate to the prediction task.

References

  1. Calculation and input contract: classification/hierarchical-label-parent-constraint-pair — tool.io

Similar or alternative tools