AI & Digital Manufacturing Analytics calculator

AI Training Data Balance Calculator

Check defect-class representation in a repeated lot-and-run sampling plan. Enter total and defect samples per run plus your training-plan target.

What this calculator does

  • Calculate planned defect-class representation across production lots and repeated sampling runs.

Formula used

  • Total samples = lots × runs per lot × samples per run
  • Defect samples = lots × runs per lot × defect samples per run
  • Defect share (%) = defect samples per run ÷ samples per run × 100
  • Other samples = total samples − defect samples
  • Share gap = target defect share − planned defect share

Inputs explained

  • Production Lots Represented: Distinct lots included in the planned capture schedule.
  • Runs per Lot: Capture runs scheduled for every included lot.
  • Labeled Samples per Run: Unique labeled samples planned in every run.
  • Defect Samples per Run: Confirmed defect-class samples allocated within each run.
  • Target Defect-Class Share: Minimum defect representation specified for this training plan.

How to use the result

  • Best suited to defect collection planning, lot-diverse training allocation.
  • The plan does not guarantee defects will be available in each run. Balanced counts do not establish independent or representative training examples.

Common questions

  • Why does adding lots leave the percentage unchanged? Each added run has the same class allocation, so both defect and total counts increase proportionally.
  • Must defect samples make up half the dataset? No. Set representation for your learning objective and validate the choice; there is no universal best class ratio.
  • Can this handle different counts in each run? Not directly. Group runs with identical allocations or calculate from the actual class totals separately.
  • Should the test set use the training balance? The test set should represent the intended evaluation population; training resampling should not silently change that population.

Last reviewed 2026-10-23.