Skip to content

Main content

Onehot Reference Level Output Budget Tool

Calculate onehot reference level output budget from explicit caller-supplied inputs.

Loading tool…

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

  1. Enter levels, dropReference, includeUnknown. 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 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 fieldMeaning and unitsAccepted input
levelsLevelsRequired. Safe integer; minimum 1.
dropReferenceDrop ReferenceRequired. Boolean.
includeUnknownInclude UnknownRequired. Boolean.
Output fieldInterpretationReturned shape
columnsColumnsRequired. Safe integer.
json
{
  "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

  1. Calculation and input contract: data-science/onehot-reference-level-output-budget — tool.io

Similar or alternative tools