Description
Return one-hot feature column count under explicit policies.
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.
Return one-hot feature column count under explicit policies.
When to use this tool
Use Onehot Reference Level Output Budget when checking one supplied feature-transform or encoding component.
How to use the tool and how it works
- Enter levels, dropReference, includeUnknown. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read columns. Use the output convention below.
Return one-hot feature column count under explicit policies. Require whole levels >= 1; columns = levels-(dropReference ? 1 : 0)+(includeUnknown ? 1 : 0).1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| levels | Levels | Required. Safe integer; minimum 1. |
| dropReference | Drop Reference | Required. Boolean. |
| includeUnknown | Include Unknown | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| columns | Columns | Required. Safe integer. |
{
"input": {
"levels": 5,
"dropReference": true,
"includeUnknown": true
},
"output": {
"columns": 5
}
} Limitations and assumptions
- The result is a budget only; categories, rank, fitting and actual encoded data are not inspected.
- 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 a correctly fitted preprocessing pipeline and suitable validation design for complete data transformation and model assessment.
References
Similar or alternative tools
- Categorical Level Unseen Fallback Token
Map a known categorical value or supplied fallback.
- Quantile Bin One Boundary Tie Rule
Assign a value to an ordered-boundary bin.