Panel Series Neural Network Settings

You can change the following settings in the Options pane of the pipeline. For more information, see Options Pane.

Note: This modeling node requires a license for SAS Viya.

Task Settings

Set the forecast task

Specify the task to run for this modeling node. These tasks must be run sequentially. For example, the Diagnose task can be run independently, but the Fit task requires that you run the Diagnose task first.

  • Diagnose: trains a neural network, computes the results, forecasts the time seriesan aggregation of transactional data into specified time intervals and sorted according to unique combinations of the default attributes (BY variables), and sends the forecasts to output. This is the default.
  • Fit: retrains a model with updated data. Parameters required for the fit task are copied from the most recently trained network when the Fit task is run. This includes variable names (inputs, nominals and target), activation functions, and the number of hidden layers and neurons. You must run the Diagnose task successfully before running the Fit task.
  • Forecast: generates forecasts using input model data. You must run the Diagnose task successfully before running the Forecast task.
  • Update: retrains a model with updated data. Hyperparameters and initial connection weights are copied from the most recently trained neural network. You must run the Diagnose task successfully before running the Update task.

Feature Generation Settings

To get a good model, enable some of the Feature Generation settings, which includes setting the number of dependent and independent variable lags. The generated features are included as independent variables when training the model.

Number of lags for the dependent variable

Specify a positive integer for the number of dependent variable lags to generate and include as independent variables. Dependent variable lags are required for the neural network to learn the order of the time series.

For lags of missing values in the horizonthe number of intervals into the future, beyond a base date, for which analyses and predictions are made., the previous forecasted values are used to generate new lag values and extend the forecasta numerical prediction of a future value for a specified time period for each unique combination of BY variable values recursively. For example, setting the value to 3 computes three independent variables with lagged values of the dependent variable.

The default value is 4.

Number of lags for the independent variables

Specify a positive integer for the number of independent variable lags to generate and include as independent variables. For example, setting the value to 3 computes three variables with lagged values for each independent variable defined in the project.

TipSetting this field equal to the dependent variable lags enables the neural network to better detect the interactions between the variables.

The default value is 4.

Seasonal dummy variables

Select this setting to generate seasonal dummy variables during feature extraction. The number of seasonal dummy variables corresponds to the Seasonal cycle length specified for the time variable.

This setting is enabled by default.

Time interval for creating seasonal dummy variables

Enter a valid time interval value for creating seasonal dummy variables. If this value is left blank, the time interval specified for the time variable is used. For example, if the time variable for the project uses Week for the time interval, 52 seasonal dummy variables are generated. If you specify Month , then only 12 seasonal dummy variables are generated.

Enter one of the following specification values. Each specification shows the corresponding setting for the Time variable on the Data tab.

Time Interval Specifications and Corresponding Time Variable Intervals

Time interval specification

Time variable setting

year

Year

yearv

ISO 8601

r445yr

Retail 4-4-5 year

r454yr

Retail 4-5-4 year

r544yr

Retail 5-4-4 year

semiyear

Semiyear

r445qtr

Retail 4-4-5 quarter

r454qtr

Retail 4-5-4 quarter

r544qtr

Retail 5-4-4 quarter

quarter

Quarter

month

Month

r445mon

Retail 4-4-5 month

r454mon

Retail 4-5-4 month

r544mon

Retail 5-4-4 month

semimonth

Semimonth

tenday

Ten-day

week

Week

weekv

ISO 8601 week

weekday

Weekday

day

Day

hour

Hour

minute

Minute

second

Second

ESM Forecast of dependent variable

Specify Yes to use an ESM forecast of the dependent variable as an independent variable.

Dependent variable trend

Specify the method to create a dependent variable trend as an independent variable. You can choose a Linear trend or Damped trend . The default is none None , in which no trend variable is created.

Model Generation Settings

Model Initialization Settings

Input standardization

Specify the method that is used to standardize the interval input variables. Select from these options:

  • Midrange
  • None
  • Z-score
Number of hidden layers

Specify 0, 1, or 2 hidden layers to include in the neural network model. If the number of hidden layers is 0, a GLIM model is trained.

You are required to specify the number of neurons and the activation function for each hidden layer.

Layer 1 neurons

Specify an integer between 0 and 100 for the number of neurons in the first hidden layer. This is required if Number of hidden layers is greater than 0.

Layer 1 activation function

Specify the activation function for the first hidden layer. This is required if Number of hidden layers is greater than 0.

Select from these options:

  • Exponential
  • Identity
  • Logistic
  • Rectifier
  • Sine
  • Tanh (hyperbolic tangent)
Layer 2 neurons

Specify an integer between 0 and 100 for the number of neurons in first second layer. This is required if Number of hidden layers is 2.

Layer 2 activation function

Specify the activation function for the second hidden layer. This is required if Number of hidden layers is 2.

Select from these options:

  • Exponential
  • Identity
  • Logistic
  • Rectifier
  • Sine
  • Tanh (hyperbolic tangent)
Include direct connections between the input and output layers

Specify whether direct connections from nodes in the input layer to nodes in the output layer should be included in the neural network. By default, this is not selected. This setting is disabled if Number of hidden layers is 0.

Dependent variable transformation

Specify Log for a logarithmic transformation for the dependent variable or None for no transformation.

Dependent variable standardization

Specify the method that is used to standardize the dependent variable. Select from these options:

  • Midrange
  • Std
  • None
Error function

Specify the error function for the dependent variable output layer. Select one of the following options:

  • Gamma — Selecting this value disables the Output layer activation function . The Exponential activation function is used with the Gamma error function.
  • Normal — When there are no hidden layers, the normal error function is used.
  • Poisson — Selecting this value disables the Output layer activation function . The Exponential activation function is used with the Poisson error function.
Output layer activation function

Specify the activation function to use on the output layer of the network. If Error function is not set to Normal , this setting is disabled and the Exponential function is used.

Specify the target layer activation function for interval targets. Select from these options:

  • Identity
  • Sine
  • Tanh
Neuron connection distribution

Specify the distribution of randomly generated initial neuron connection weights. Select from these options:

  • Cauchy
  • MSRA
  • Normal
  • Uniform
  • Xavier (default)
Random seed

Specify a positive integer to use for generating random numbers to initialize the network.

Model Training Settings

Algorithm

Specify the optimization method used to train the neural network. Select one of the following options:

  • LBFGS — limited memory version of Broyden-Fletcher-Goldfarb-Shanno (BFGS)
  • SGD — Stochastic gradient descent
SGD Options

If you select the SGD algorithm, the following settings apply.

Learning rate

Specify the learning rate parameter for SGD optimization. The default value is 0.001.

Annealing rate

Specify the annealing rate parameter for SGD optimization. The default value is 0.000001.

SGD seed

Specify the random seed to use for the SGD algorithm.

Input layer dropout ratio

Specify the dropout ratio for the input layer when SGD optimization is used. The default value is 0. Enter a nonnegative number that is less than 1.

Hidden layer dropout ratio

Specify the dropout ratio for the hidden layers when SGD optimization is used. The default value is 0. Enter a nonnegative number that is less than 1.

Create deterministic results

Specifies whether to create deterministic (reproducible) results using the specified SGD seed . Checking this can significantly increase run time.

  • SGD seed — Specifies the seed to use for SGD optimization to create reproducible results. This setting is displayed when Create deterministic results is selected.
Number of tries

Specify the number of times to train the network with different initial estimates for connection weights. The network with the smallest error is chosen as the optimal network.

Maximum training iterations

Specify the maximum number of training iterations within each try.

Maximum time (minutes)

Specify in minutes the maximum time allowed for each try. Training continues until the all tries have completed. Zero indicates not to use time to limit the training.

L1 regularization

Specify a nonnegative multiplier for the L1 norm of the weights that is used in the neural network loss function. The default is 0.

L2 regularization

Specify a nonnegative multiplier for the L2 norm of the weights that is used in the neural network loss function. The default is 0.

Enable early stopping

Select this option to stop training when the model begins to overfit. The training stops after a number of consecutive iterations without improvement in the holdout region. Set the number of consecutive iterations in Stagnation limit for early stopping .

Stagnation limit for early stopping

Specify the number of consecutive iterations without improvement in validation error before stopping the optimization. Specifying 0 has the same effect as deselecting Enable early stopping . The default setting is 10.

This field is available only when Enable early stopping is selected.

Autotune Settings

Enable Autotune — Turn this setting on to enable autotuning of neural network parameters. Autotuning is applied only when running the Diagnose task.

Note: Autotuning can significantly increase the amount of time required to train the model.
Note: If you enable autotune, this modeling node fails if Number of tries is set to a number greater than 1.
Hidden layer tuning

Specify whether to autotune the number of hidden layers. If you enable this setting for autotuning, specify the initial value and the lower and upper bounds for the number of hidden layers. This setting overrides Number of hidden layers in the Model Initialization settings.

Hidden neuron tuning

Specify whether to autotune the number of neurons in each hidden layer. Specify the initial value and the lower and upper bounds for the number of neurons. This setting overrides Number of hidden layers in the Model Initialization settings.

This setting is enabled if Hidden layer tuning is enabled.

L1 regularization

Specify whether to autotune the nonnegative multiplier of the L1-norm of the weights in the loss function. This setting overrides L1 regularization in Model Training settings. This setting overrides L1 regularization in Model Training settings.

If you enable this setting for autotuning, specify the initial value and the lower and upper bounds for the multiplier. By default, the initial value and lower bound are 0 and the upper bound is 0.1.

L2 regularization

Specify whether to autotune the nonnegative multiplier of the L2-norm of the weights in the loss function. This setting overrides L2 regularization in Model Training settings.

If you enable this setting for autotuning, specify the initial value and the lower and upper bounds for the multiplier. By default, the initial value and lower bound are 0 and the upper bound is 0.1.

Learning rate

Specify whether to autotune the learning rate for the hidden layers. If you enable this setting for autotuning, specify the initial value and the lower and upper bounds for the learning rate. This setting overrides Learning Rate in the Model Training settings.

This setting is disabled if the Algorithm under Model Training is set to LBFGS.

Annealing rate

Specify whether to autotune the annealing rate for the hidden layers. If you enable this setting for autotuning, specify the initial value and the lower and upper bounds for the learning rate. This setting overrides Annealing Rate in the Model Training settings.

This setting is disabled if the Algorithm under Model Training is set to LBFGS.

Maximum autotuning iterations

Specify the maximum number of iterations for autotuning. Autotuning continues until all iterations are completed or the Maximum autotuning time (minutes) is reached, whichever is first.

Maximum autotuning time (minutes)

Specify the maximum time allowed for autotuning in minutes. Autotuning continues until this time is reached or the Maximum autotuning iterations are completed, whichever is first.

Autotune seed

Specify the random seed for the autotuning.

Autotune objective function

Specify the objective function to optimize when tuning parameters. You can select one of these options:

  • ASE — Average squared error
  • MAE — Mean absolute error
  • MSE — Mean squared error
  • MSLE — Mean squared logarithmic error
  • RMAE — Root mean absolute error
  • RMSE — Root mean square error
  • RMSLE — Root mean squared logarithmic error

Model Validation Settings

The holdout samplethe number of periods of the most recent data that should be excluded from the parameter estimation. The holdout sample can be used to evaluate the forecasting performance of a candidate model. is the minimum calculated value between these two settings.

Number of data points used in the holdout sample

Enter a positive integer to be used as the size of the holdout sample. The actual holdout sample is the minimum between this value and the Percentage of data points used in the holdout sample . The default value is zero, which means no holdout sample is used.

Percentage of data points used in the holdout sample

Enter a value between 0 and 100 to specify the percentage of the sample that is used for the holdout sample. The actual holdout sample is the minimum between this value and the Number of data points used in the holdout sample . This option is displayed only if Number of data points used in the holdout sample is greater than zero.

Output Tables

The following tables are automatically generated when running this modeling node. The tables can be saved to another caslib by using the Save Data Node.

Select any of the following optional tables that you want generated when this node is run. After the node is run, you can use the Save Data Node to save the tables.

Note: The first two tables, NNOUTMODELINFO and NNOUTMODEL, are generated only when Set the forecast task is not set to Forecast. Once generated, these tables are retained in the caslib when the node is run again with task set to Forecast.

The following tables can be selected only if Enable Autotune is turned on. If you select any of the autotune tables, you must set the task to Diagnose, Fit, or Update. The node fails if the task is set to Forecast.

Last updated: March 16, 2026