Skip to content

Main content

Random Inventory Forecast Error Dataset Generator

Construct nonnegative synthetic demand with selected perfect, signed-additive or multiplicative forecast patterns, retain parameters and zero-clamping, and delegate MAE plus logistics WMAPE/bias. All-zero actual demand makes WMAPE explicitly undefined, not zero; outputs preserve existing floating arithmetic and are controlled fixtures rather than forecast-quality guarantees.

Loading tool…

Description

Construct nonnegative synthetic demand with selected perfect, signed-additive or multiplicative forecast patterns, retain parameters and zero-clamping, and delegate MAE plus logistics WMAPE/bias. All-zero actual demand makes WMAPE explicitly undefined, not zero; outputs preserve existing floating arithmetic and are controlled fixtures rather than forecast-quality guarantees.

A logistics test dataset combines supplied operating ranges with explicit quantity and unit conventions. Constructed measurements and calculated indicators can exercise reports and calculators without claiming to represent an observed operation or a safe physical plan.

Construct nonnegative synthetic demand with selected perfect, signed-additive or multiplicative forecast patterns, retain parameters and zero-clamping, and delegate MAE plus logistics WMAPE/bias. All-zero actual demand makes WMAPE explicitly undefined, not zero; outputs preserve existing floating arithmetic and are controlled fixtures rather than forecast-quality guarantees.

When to use this tool

Use this generator to create reproducible inventory forecast error dataset cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.

How to use the tool and how it works

  1. Supply minimumActual, maximumActual, patterns, minimumDelta, maximumDelta, factors, count in the field shapes below. Set seed when you need an explicit replay.
  2. Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
  3. Read rows, meanAbsoluteError, wmape, wmapeUndefinedReason. Use the conventions below and keep answer-bearing fields separate when presenting an exercise.

Draw actual demand and an exact, additive, or multiplicative forecast pattern. Clamp negative forecasts to zero, retain raw forecast and parameters, then calculate mean absolute error and WMAPE where aggregate actual demand is positive.1

Delegated operations used for this result: wmape forecast accuracy logistics; mean absolute error. Their calculation or parsing conventions apply to the corresponding result fields.2, 3

Input fieldMeaning and unitsAccepted input
minimumActualMinimum ActualRequired. Safe integer; minimum 0; maximum 9007199254740991.
maximumActualMaximum ActualRequired. Safe integer; minimum 0; maximum 9007199254740991.
patternsPatternsRequired. Array of Text; one of "additive", "multiplicative", "perfect".; minimum items 1; maximum items 3.
minimumDeltaMinimum DeltaRequired. Safe integer; minimum -9007199254740991; maximum 9007199254740991.
maximumDeltaMaximum DeltaRequired. Safe integer; minimum -9007199254740991; maximum 9007199254740991.
factorsFactorsRequired. Array of Finite number; minimum 0.; minimum items 1; maximum items 32.
countRequested count; the mechanics explain whether one draw expands into several returned records.Required. Safe integer; minimum 1; maximum 128.
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
rowsRowsRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 128.
rows[].indexIndexRequired. Safe integer; minimum 1; maximum 128.
rows[].patternPatternRequired. Text; one of "additive", "multiplicative", "perfect".
rows[].parameterParameterRequired. Finite number. or Null.
rows[].actualUnitsActual UnitsRequired. Safe integer; minimum 0; maximum 9007199254740991.
rows[].rawForecastRaw ForecastRequired. Finite number.
rows[].forecastUnitsForecast UnitsRequired. Finite number; minimum 0.
rows[].clampedAtZeroClamped At ZeroRequired. Boolean.
meanAbsoluteErrorMean Absolute ErrorRequired. Finite number; minimum 0.
wmapeWmapeRequired. Object; no unknown keys. or Null.
wmapeUndefinedReasonWmape Undefined ReasonRequired. Text; exactly "zero-actual-demand". or Null.
randomnessReplay metadata: source is seed or context; seed is the normalized 32-bit seed or null for a context source.Required. Object; no unknown keys.
randomness.seedOptional numeric replay seed; normalization and precedence are explained below.Required. Safe integer. or Null.
randomness.sourceSourceRequired. Text; one of "context", "seed".

An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.

json
{
  "input": {
    "minimumActual": 0,
    "maximumActual": 10,
    "patterns": [
      "additive",
      "multiplicative",
      "perfect"
    ],
    "minimumDelta": -4,
    "maximumDelta": 4,
    "factors": [
      0.5,
      1.5
    ],
    "count": 5,
    "seed": 42
  },
  "output": {
    "rows": [
      {
        "index": 1,
        "pattern": "multiplicative",
        "parameter": 1.5,
        "actualUnits": 6,
        "rawForecast": 9,
        "forecastUnits": 9,
        "clampedAtZero": false
      },
      {
        "index": 2,
        "pattern": "additive",
        "parameter": 0,
        "actualUnits": 7,
        "rawForecast": 7,
        "forecastUnits": 7,
        "clampedAtZero": false
      },
      {
        "index": 3,
        "pattern": "multiplicative",
        "parameter": 1.5,
        "actualUnits": 3,
        "rawForecast": 4.5,
        "forecastUnits": 4.5,
        "clampedAtZero": false
      },
      {
        "index": 4,
        "pattern": "additive",
        "parameter": 3,
        "actualUnits": 5,
        "rawForecast": 8,
        "forecastUnits": 8,
        "clampedAtZero": false
      },
      {
        "index": 5,
        "pattern": "additive",
        "parameter": -3,
        "actualUnits": 8,
        "rawForecast": 5,
        "forecastUnits": 5,
        "clampedAtZero": false
      }
    ],
    "meanAbsoluteError": 2.1,
    "wmape": {
      "absoluteErrorTotal": 10.5,
      "actualTotal": 29,
      "biasPercent": 15.517241379310345,
      "wmapePercent": 36.206896551724135
    },
    "wmapeUndefinedReason": null,
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • WMAPE is null with zero-actual-demand reason when all actuals are zero. Pattern labels describe generation, not fitted forecasts or evidence of future accuracy; multiplicative forecasts can be fractional.
  • A replay requires the same complete input and implementation. Randomized construction does not guarantee uniform coverage of every feasible output; finite samples can repeat unless a distinct-selection rule is explicitly stated.
  • The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.

Alternative or Complementary methods

For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.

References

  1. Tool behavior and example: Random Inventory Forecast Error Dataset Generator — tool.io

  2. Calculation or validation: logistics/wmape-forecast-accuracy-logistics — tool.io

  3. Calculation or validation: metrics/mean-absolute-error — tool.io

Similar or alternative tools

  • Random Inventory ABC Classification Dataset Generator

    Generate positive synthetic demand and unit values in one caller-labeled value unit, rank independently by annual usage value and demand throughput, and delegate cumulative-share ABC classifications. Value policy remains the existing fixed 80/95 boundaries, velocity boundaries are explicit, ties retain item order, and classification uses the cumulative share including the current item—not a forced A class for the largest item.

  • Random Inventory Shrinkage Audit Dataset Generator

    Generate synthetic book quantities and signed count deltas, clamp negative physical counts explicitly at zero, and delegate inventory-loss units and percentages. Overage remains negative shrinkage; zero book quantity has an undefined percentage with an explicit reason, not a fabricated zero, and values are not evidence about actual inventory.