Skip to content

Main content

Minmax Feature Train Test Range Gap Tool

Apply training anchors without clipping a test observation outside its training range.

Loading tool…

Description

Scale a value against training bounds and report range excess.

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.

Scale a value against training bounds and report range excess.

When to use this tool

Use Minmax Feature Train Test Range Gap when checking one supplied feature-transform or encoding component.

How to use the tool and how it works

  1. Enter value, trainMinimum, trainMaximum. 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 scaled, belowRange, aboveRange. Use the output convention below.

Scale a value against training bounds and report range excess. Require trainMaximum > trainMinimum; scaled = (value-min)/(max-min), with nonnegative belowRange/aboveRange in original units.1

Input fieldMeaning and unitsAccepted input
valueValueRequired. Finite number.
trainMinimumTrain MinimumRequired. Finite number.
trainMaximumTrain MaximumRequired. Finite number.
Output fieldInterpretationReturned shape
scaledScaledRequired. Finite number.
belowRangeBelow RangeRequired. Finite number.
aboveRangeAbove RangeRequired. Finite number.
json
{
  "input": {
    "value": 12,
    "trainMinimum": 2,
    "trainMaximum": 10
  },
  "output": {
    "scaled": 1.25,
    "belowRange": 0,
    "aboveRange": 2
  }
}

Limitations and assumptions

  • Scaled output is not clipped; extrema are supplied rather than fitted only from training data.
  • 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/minmax-feature-train-test-range-gap — tool.io

Similar or alternative tools