Auto-SARIMA Learner

Automatically identifies optimal parameters and trains a Seasonal AutoRegressive Integrated Moving Average (SARIMA) model for time series forecasting. Uses simulated annealing optimization to find the best-fitting model configuration. Note: For non-seasonal data, set seasonal period to 0 to fit standard ARIMA models. This is the default option.

Model Components

SARIMA(p,d,q)(P,D,Q,s) models capture both short-term and seasonal patterns in time series data:

  • AR (p): AutoRegressive component - models dependence on p previous observations
  • I (d): Integration order - degree of non-seasonal differencing needed for stationarity
  • MA (q): Moving Average component - models dependence on q previous forecast errors
  • Seasonal AR (P): Seasonal autoregressive component at lag s
  • Seasonal I (D): Seasonal integration order - seasonal differencing for stationarity
  • Seasonal MA (Q): Seasonal moving average component at lag s
  • Period (s): Length of seasonal cycle (e.g., 12 for monthly data with yearly patterns)

Optimization Strategy

Two-Phase Parameter Search:

  1. Stationarity Testing (d, D): Uses Kwiatkowski-Phillips-Schmidt-Shin (KPSS) tests to automatically determine required differencing orders. Applies differencing until series achieves stationarity (p-value ≥ 0.05) or reaches user-defined maximum orders.

  2. Simulated Annealing (p, q, P, Q): Intelligently explores parameter combinations within user constraints to minimize the selected information criterion (AIC/BIC/HQIC). The annealing process allows escaping local optima by occasionally accepting worse solutions early in optimization, then becoming increasingly selective as the "temperature" decreases.

Configuration Options

  • Target Column: Numeric time series variable (no missing values allowed)
  • Seasonal Period: Cycle length (12=monthly/yearly, 7=daily/weekly, 0=no seasonality), For long-term seasonal patterns (periods >100), consider using Fourier Transform or STL decomposition to pre-process and remove seasonality before SARIMA modeling, as large seasonal periods cause severe computational bottlenecks, excessive memory consumption, and potential numerical instability.
  • Log Transformation: Optional variance stabilization (requires positive values)
  • Parameter Bounds: Maximum search ranges for all SARIMA components
  • Information Criterion: AIC (prediction focus), BIC (parsimony focus), or HQIC (balanced)
  • Optimization Control: Annealing steps, MCMC iterations, temperature schedule, early stopping

Model Outputs

  1. Predictions & Residuals: In-sample fit assessment with quality metrics
  2. Model Statistics: Optimal parameters, coefficients, standard errors, and fit statistics
  3. Diagnostic Tests: Residual autocorrelation and normality assessments
  4. Optimization History: Complete search transparency showing all tested parameter combinations
  5. Trained Model: Ready-to-use model object for forecasting with the Auto-SARIMA Predictor

Use Cases

  • Economic Forecasting: GDP, inflation, unemployment with seasonal patterns
  • Sales Analytics: Revenue, demand planning with monthly/quarterly cycles
  • Operations Research: Inventory management, capacity planning with known seasonality
  • Environmental Science: Temperature, precipitation with annual cycles
  • Web Analytics: Traffic patterns with daily/weekly seasonality

Options

Target Column

Numeric time series column for model training. Must contain no missing values. This is the variable the model will learn to predict and forecast.

Seasonal Period (s)

Specify the length of the seasonal period for your time series data. This parameter determines how many observations constitute one complete seasonal cycle:

Common Seasonal Periods by Data Granularity: • Monthly data with yearly seasonality: Set to 12 (12 months = 1 year) • Weekly data with yearly seasonality: Set to 52 (52 weeks = 1 year) • Daily data with weekly seasonality: Set to 7 (7 days = 1 week) • Hourly data with daily seasonality: Set to 24 (24 hours = 1 day) • Quarterly data with yearly seasonality: Set to 4 (4 quarters = 1 year) • Minute data with hourly seasonality: Set to 60 (60 minutes = 1 hour)

⚠️ AVOID Large Seasonal Periods (>100): • Daily data with yearly seasonality (s=365): ❌ Causes severe computational issues • Hourly data with weekly patterns (s=168): ❌ Extremely slow fitting • Instead: Use data aggregation (daily→weekly, hourly→daily) or remove seasonality first

Recommended Approach for Beginners: 1. Start with s=0 (ARIMA) to understand basic time series patterns 2. Add seasonality gradually only if clear seasonal patterns exist

Guidelines for Selection: - Examine your data visually or with autocorrelation plots to identify repeating patterns - The seasonal period should match the frequency of recurring patterns in your data - For multiple seasonalities (e.g., daily + yearly), choose the most prominent one - Set to 0 to disable seasonal components and fit a standard ARIMA model first

Example: If analyzing monthly sales data that peaks every December, use seasonal period = 12 to capture the yearly pattern.

Log-transform data for modelling

Apply natural logarithm transformation before modeling to stabilize variance (requires all values > 0). Fitted values are back-transformed in the in-sample output; residuals and residual-based diagnostics remain on the log scale.

Non Seasonal Parameters

Maximum search bounds for non-seasonal ARIMA components (p,d,q). These constraints define the upper limits for parameter exploration during optimization. Higher bounds allow more complex models but increase computation time.

Max AR Order (p)

Maximum autoregressive order - how many previous observations can influence current value. Higher values capture longer-term dependencies but increase model complexity. Typical range: 0-5.

Max I Order (d)

Maximum non-seasonal differencing order - how many times the series can be differenced to achieve stationarity. Usually 0-2 is sufficient for most time series. Higher values rarely needed.

Max MA Order (q)

Maximum moving average order - how many previous forecast errors can influence current prediction. Captures short-term noise patterns. Typical range: 0-5.

Seasonal Parameters

Maximum search bounds for seasonal ARIMA components (P,D,Q). These constraints control the complexity of seasonal patterns the model can capture. Set to 0 to disable specific seasonal components.

Max Seasonal AR Order (P)

Maximum seasonal autoregressive order - how many seasonal lags can influence current value. Captures year-over-year or cycle-over-cycle dependencies. Typical range: 0-3.

Max Seasonal I Order (D)

Maximum seasonal differencing order - how many seasonal differences needed for stationarity. Usually 0-1 is sufficient. Set to 0 if no seasonal trends are present.

Max Seasonal MA Order (Q)

Maximum seasonal moving average order - how many seasonal forecast errors can influence predictions. Captures seasonal noise patterns. Typical range: 0-3.

Model Selection

Information criterion selection for model comparison during optimization. Different criteria emphasize different trade-offs between model fit quality and complexity penalty.

Model Selection Criterion

Information criterion for comparing models during optimization. Lower values indicate better models. AIC emphasizes prediction accuracy, BIC favors simplicity, HQIC balances both concerns.

Available options:

  • AIC: Akaike Information Criterion - Optimizes prediction accuracy, allows moderate complexity. Best for forecasting applications.
  • BIC: Bayesian Information Criterion - Strong complexity penalty, favors simpler models. Best for model interpretation and explanation.
  • HQIC: Hannan-Quinn Information Criterion - Balanced approach between prediction and parsimony. Good general-purpose choice.

Optimization Loop Parameters

Advanced simulated annealing configuration for parameter search. Controls the thoroughness and behavior of the optimization process. Higher values provide more thorough search but increase computation time.

Number of Annealing Steps

Temperature schedule length for optimization. More steps provide thorough search but increase runtime. Default (5) balances quality and speed for most applications.

MCMC Steps per Annealing Step

Parameter proposals at each temperature level. More steps improve exploration but increase computation. Default (10) is sufficient for typical parameter spaces.

Initial Annealing Temperature (beta0)

Starting temperature (exploration phase). Lower values allow more random exploration initially. Must be less than beta1. Default (0.1) works well for most cases.

Final Annealing Temperature (beta1)

Final temperature before greedy phase. Higher values become more selective sooner. Must be greater than beta0. Default (3.0) provides good convergence.

Step Size for Parameter Proposals

Maximum parameter change per proposal. Larger steps explore more aggressively but may skip good solutions. Default (1) provides steady progress.

Early Stopping Patience

Stops optimization after this many steps without improvement. Prevents unnecessary computation when convergence is reached. Set to 0 to disable early stopping.

Input Ports

Icon

Time series data table for training the Auto-SARIMA model. The selected target column must be numeric and contain no missing values.

Output Ports

Icon

Model fit quality assessment table containing original values, fitted predictions, residuals, and absolute errors. Initial unstable predictions (first max(2 * seasonal period, 10) observations; 10 for non-seasonal models) are excluded to ensure reliable performance metrics.

Icon

Complete model summary including optimal SARIMA parameters (p,d,q)(P,D,Q,s), fitted coefficients with standard errors, and goodness-of-fit statistics (AIC, BIC, Log Likelihood, MSE, MAE).

Icon

Statistical tests for model adequacy assessment: Ljung-Box test for autocorrelation, Jarque-Bera test for normality (large samples), and Shapiro-Wilk test for normality (small-medium samples).

Icon

Detailed optimization transparency table showing all parameter combinations tested during simulated annealing search, including information criteria values (AIC/BIC/HQIC), log likelihood, and fitting status for each attempt.

Icon

Trained SARIMA model object (pickled SARIMAXResults) ready for forecasting. Can be used with the Auto-SARIMA Predictor node to generate forecasts of any length without model retraining.

Popular Predecessors

  • No recommendations found

Popular Successors

  • No recommendations found

Views

This node has no views

Workflows

  • No workflows found

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.