Description
Map a known categorical value or supplied fallback.
Feature transformations depend on training-derived parameters, category vocabularies and explicit missing-value conventions. A local formula or token rule does not ensure that fitting, application and validation avoid data leakage.
Map a known categorical value or supplied fallback.
When to use this tool
Use Categorical Level Unseen Fallback Token when checking one supplied feature-transform or encoding component.
How to use the tool and how it works
- Enter value, levels, fallback. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read mapped, known, index. Inspect known before interpreting the associated values.
Map a known categorical value or supplied fallback. Require unique levels; return known, zero-based index or -1, and mapped value unchanged or fallback.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| value | Value | Required. Text; maximum UTF-16 length 8192. |
| levels | Levels | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| fallback | Fallback | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| mapped | Mapped | Required. Text; maximum UTF-16 length 8192. |
| known | Whether the supplied value has the stated known observation or vocabulary status. | Required. Boolean. |
| index | Zero-based vocabulary position, or -1 for an unseen value mapped to fallback. | Required. Safe integer. |
{
"input": {
"value": "C",
"levels": [
"A",
"B"
],
"fallback": "UNKNOWN"
},
"output": {
"mapped": "UNKNOWN",
"known": false,
"index": -1
}
} Limitations and assumptions
- Fallback can equal a known label; this does not fit an encoder or validate downstream coding semantics.
- 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
Use a correctly fitted preprocessing pipeline and suitable validation design for complete data transformation and model assessment.
References
Similar or alternative tools
- Onehot Reference Level Output Budget
Return one-hot feature column count under explicit policies.
- Feature Null Run Length
Return a consecutive null-flag run from a supplied index.