Description
Return hierarchical label path distance through a supplied common ancestor.
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.
Return hierarchical label path distance through a supplied common ancestor.
When to use this tool
Use Hierarchical Label Depth Error Term when checking the stated label-set or parent/ancestor constraint.
How to use the tool and how it works
- Enter actualDepth, predictedDepth, commonAncestorDepth. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read upward, downward, pathLength. Use the output convention below.
Return hierarchical label path distance through a supplied common ancestor. Require nonnegative whole depths and ancestor depth <= both; upward = actualDepth-ancestor, downward = predictedDepth-ancestor, pathLength sums them.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| actualDepth | Actual Depth | Required. Safe integer; minimum 0. |
| predictedDepth | Predicted Depth | Required. Safe integer; minimum 0. |
| commonAncestorDepth | Common Ancestor Depth | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| upward | Upward | Required. Safe integer. |
| downward | Downward | Required. Safe integer. |
| pathLength | Path Length | Required. Safe integer. |
{
"input": {
"actualDepth": 4,
"predictedDepth": 3,
"commonAncestorDepth": 2
},
"output": {
"upward": 2,
"downward": 1,
"pathLength": 3
}
} Limitations and assumptions
- The ancestor and depths are asserted; no tree, ancestry relation or lowest-common-ancestor computation is verified.
- 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.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
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
Similar or alternative tools
- Hierarchical Label Parent Constraint Pair
Check a selected child label's parent implication.
- Ordinal Cumulative Label Target Tool
Compute ordinal cumulative label target from explicit bounded inputs.