Skip to content

Main content

Classification: Binary Label Smoothing Target Pair Tool

Apply uniform-two-class label smoothing with explicit epsilon in [0,1], returning both target components rather than a predicted class.

Loading tool…

Description

Return a uniformly smoothed binary target pair.

Training losses compare predicted probabilities with target mass, and temperature rescales logits before a probability transformation. Label smoothing and focal weighting alter particular loss terms; evaluating one term or transformation does not train a model, select its hyperparameters or establish calibrated confidence.

Return a uniformly smoothed binary target pair.

When to use this tool

Use Classification: Binary Label Smoothing Target Pair when evaluating the stated loss contribution, smoothed target or temperature transformation.

How to use the tool and how it works

  1. Enter label, smoothing. 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 result. Expand result to inspect the returned fields.

Return a uniformly smoothed binary target pair. Require label zero/one and smoothing in [0,1]; each target combines its one-hot mass times 1-smoothing with smoothing/2.1

Uniform label smoothing mixes a one-hot target with equal mass over every class, including the true class.2

Input fieldMeaning and unitsAccepted input
labelLabelRequired. Safe integer. Calculation range: 0 through 1, inclusive.
smoothingSmoothingRequired. Finite number.
Output fieldInterpretationReturned shape
resultReturned calculated value or nested object under the stated output convention.Required. Object.
result.negativeTargetNegative TargetCalculated result member: number.
result.positiveTargetPositive TargetCalculated result member: number.
json
{
  "input": {
    "label": 1,
    "smoothing": 0.2
  },
  "output": {
    "result": {
      "negativeTarget": 0.1,
      "positiveTarget": 0.9
    }
  }
}

Limitations and assumptions

  • At smoothing one both targets are 0.5; no loss, training or recommended smoothing level is determined.
  • Outputs are nested inside result. 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

Sum the appropriate contributions for a complete loss, and use a validated training/calibration procedure and held-out evaluation to select hyperparameters and assess predictions.

References

  1. Calculation and input contract: classification/binary-label-smoothing-target-pair — tool.io

  2. Rethinking the Inception Architecture for Computer Vision — Christian Szegedy and coauthors

Similar or alternative tools