Description
Select a weighted ordinal median under an equality policy.
Ordinal labels have an order, but adjacent categories need not be equally spaced measurements. Index distances, cumulative targets and weighted medians preserve a specified ordering while probability normalization, equality at a median boundary and distance costs remain distinct conventions.
Select a weighted ordinal median under an equality policy.
When to use this tool
Use Ordinal Median Class Boundary when evaluating the stated ordered-label target, distance or mass convention.
How to use the tool and how it works
- Enter orderedClasses, probabilities, equalityToLower. Follow any array-alignment requirements below. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read classIndex, classLabel, cumulativeMass. Use the output convention below.
Select a weighted ordinal median under an equality policy. Require aligned unique orderedClasses/nonnegative weights with positive total; choose first cumulative mass >= half when equalityToLower, otherwise > half; return index, label and raw cumulativeMass.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| orderedClasses | Ordered Classes | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| probabilities | Nonnegative ordinal weights with positive sum; normalization to one is not required. | Required. Array of finite number; minimum 0; maximum items 256. |
| equalityToLower | Equality To Lower | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| classIndex | Class Index | Required. Safe integer. |
| classLabel | Class Label | Required. Text; maximum UTF-16 length 8192. |
| cumulativeMass | Raw cumulative weight through the selected class, not a normalized probability. | Required. Finite number. |
{
"input": {
"orderedClasses": [
"A",
"B",
"C"
],
"probabilities": [
0.5,
0.25,
0.25
],
"equalityToLower": true
},
"output": {
"classIndex": 0,
"classLabel": "A",
"cumulativeMass": 0.5
}
} Limitations and assumptions
- Weights need not sum to one; the input order defines ordinality and no median confidence or calibrated probabilities are inferred.
- 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
Use meaningful ordered labels and an appropriate ordinal model; evaluate prediction quality with costs and probability assumptions justified for the actual categories.
References
Similar or alternative tools
- Ordinal Probability Mass Interval
Return probability mass over a closed ordinal-index interval.
- Ordinal Label Cost Matrix Cell
Return ordinal class error cost.