AI & Machine Learning

GRU Forecast Calculator

Paste values, simulate gates, and preview multi-step trends. Control biases, seeds, and evaluation points precisely. Generate reports and downloads to support model decisions today.

Calculator Inputs
Paste a single numeric series. One value per line works best.
How many future steps to predict.
Used only for validation and guidance.
Larger sizes add capacity and parameters.
Helps keep gate activations stable.
Evaluate last K one-step predictions.
Manual mode enables exact reproducibility.
Only used for auto-generated weights.
Controls the random range for weights.
Used when initialization is Uniform.
Higher values favor faster updates.
Higher values favor more resetting.
Paste numbers separated by new lines, commas, or spaces.
Reset
Example Data Table
A short series you can load into the calculator.
t Value
1120.000
2122.000
3125.000
4127.000
5126.000
6130.000
7133.000
8132.000
9135.000
10138.000
11140.000
12142.000
This is only sample data for demonstration.
Formula Used

This calculator performs a GRU forward pass for a univariate series. It updates a hidden state using gates and produces a next-step output.

zt = σ(Wzxt + Uzht−1 + bz)
rt = σ(Wrxt + Urht−1 + br)
ĥt = tanh(Whxt + Uh(rt ⊙ ht−1) + bh)
ht = (1 − zt) ⊙ ht−1 + zt ⊙ ĥt
yt = Wy·ht + by

Multi-step forecasting is recursive: the previous prediction becomes the next input.

How to Use This Calculator
Step-by-step
  • Paste your numeric series into the data box.
  • Choose normalization to stabilize gate behavior.
  • Set hidden units and the forecast horizon.
  • Pick auto weights or provide manual weight JSON.
  • Press Calculate Forecast to see results.
Practical tips
  • Use backtest points to compare recent predictions.
  • Try different seeds to see sensitivity effects.
  • Increase update bias to react faster to changes.
  • Export CSV or PDF to share model outputs.
  • Replace auto weights with trained weights for realism.
Note: This page is a learning-focused simulator, not a training engine.

Forecast objective

This tool estimates future values from a single numeric time series using gated recurrent dynamics. It runs a forward pass to produce one-step predictions, then repeats recursively for the selected horizon. The output is best used for scenario exploration, interface testing, and reporting workflows. When you replace auto weights with trained weights, the same interface can reflect real model behavior for production analyses.

Input data guidance

Paste values as one number per line, or separated by commas. Use at least lookback plus two points to stabilize warm-up updates. For business series, include recent seasonality segments if available. For sensor series, remove obvious spikes before forecasting. If your values vary widely, choose min–max or z-score scaling to keep gate activations within responsive ranges.

Gate mathematics overview

Each step computes update and reset gates with a sigmoid, producing vectors between zero and one. The reset gate modulates prior memory before the candidate state is formed with tanh. The update gate blends the prior state and the candidate state to create the new hidden state. A linear readout then maps the hidden state to a numeric forecast.

Model controls and sensitivity

Hidden units control capacity and parameter count, which grows with three hidden matrices. Larger sizes can express richer dynamics but may amplify instability when weights are random. The seed ensures reproducible weight generation, helping you compare settings. Update bias encourages faster adaptation to new inputs, while reset bias influences how strongly the model forgets older context during transitions. Parameter count equals 3h + 3h² + 3h + h + 1 for univariate input. The lookback field does not change the equations here; it helps validate minimum history. Manual weights must include Wz, Uz, bz, Wr, Ur, br, Wh, Uh, bh, Wy, and by. Backtest scores summarize last K one-step predictions only here.

Export and reporting workflow

After calculation, results appear above the form for quick review. The table lists each forecasted step with a numeric value at full precision. CSV export is suited for spreadsheets, dashboards, and audit trails. PDF export creates a lightweight briefing page for stakeholders. Pair exports with backtest metrics to communicate short-horizon fit and forecast uncertainty.

FAQs

1) What does this calculator actually predict?

It forecasts future steps from your series using a GRU forward pass. Auto-generated weights demonstrate gate behavior and interface outputs, not trained accuracy. Replace weights with trained parameters to reflect your real model.

2) Can I use trained weights from my own model?

Yes. Switch to Manual JSON and paste your parameters using the required keys. Ensure vector and matrix sizes match the chosen hidden units. The calculator uses univariate input, so W vectors are length h and U matrices are h×h.

3) Why do normalization choices change results?

Gates use sigmoid and tanh, which saturate with large magnitudes. Scaling keeps inputs and intermediate sums within sensitive regions. Min–max works for bounded ranges, while z-score suits drifting series with changing levels.

4) How are backtest metrics computed here?

The tool compares one-step predictions against the next observed value. It reports RMSE, MAE, and MAPE on the last K points you select. Multi-step forecasts are not used in the backtest metrics.

5) What settings are reasonable for hidden units and horizon?

Start with 8 to 16 hidden units for quick iteration. Keep horizons modest when weights are random, since recursive forecasting compounds error. For trained weights, align horizon with your operational planning window and validate with rolling tests.

6) Are the CSV and PDF exports identical?

They contain the same forecast table, but in different formats. CSV is machine-friendly for spreadsheets and pipelines. PDF is a compact, shareable summary designed for quick review and archiving.

Related Calculators

Seasonality Detection ToolAuto ARIMA SelectorMAPE Error CalculatorMAE Error CalculatorCross Validation ForecastRolling Window SplitOutlier Detection SeriesAnomaly Detection SeriesChange Point DetectionDynamic Time Warping

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.