Back to models
Forecaster

RBFForecaster

Forecasting model using RBF transformations and ‘NN’ layers for time series.

Quickstart

python
from sktime.forecasting.rbf import RBFForecaster

estimator = RBFForecaster(window_length=10, hidden_size=32, batch_size=32, centers=None, gamma=1.0, rbf_type='gaussian', hidden_layers=[64, 32], optimizer='adam', lr=0.01, epochs=100, stride=1, criterion='mse', device='cpu', mode='ar', pred_len=None, activation='relu', dropout_rate=0.1)

Parameters(17)

window_lengthint, optional (default=10)
Length of the input sequence for each sliding window.
hidden_sizeint, optional (default=32)
Number of units in the RBF layer.
batch_sizeint, optional (default=32)
Size of mini-batches for training.
centersarray-like, optional (default=None)
Center points for RBF transformations.
gammafloat, optional (default=1.0)
Scaling factor controlling the spread of the RBF.
rbf_typestr, optional (default=”gaussian”)

The type of RBF kernel to apply.

  • "gaussian": \(\exp(-\gamma (t - c)^2)\)

  • "multiquadric": \(\sqrt{1 + \gamma (t - c)^2}\)

  • "inverse_multiquadric": \(\frac{1}{\sqrt{1 + \gamma (t - c)^2}}\)

hidden_layerslist of int, optional (default=[64, 32])
Sizes of linear layers following the RBF layer.
optimizer{“adam”, “sgd”, “rmsprop”}, optional (default=”adam”)
Type of optimizer to use.
lrfloat, optional (default=0.01)
Learning rate for optimizer.
epochsint, optional (default=100)
Number of training epochs.
strideint, optional (default=1)
Step size between windows.
criterionstr, optional (default=”mse”)
Loss function to use during training.
devicestr, optional (default=”cpu”)
Device to use for training and computation. Options are “cpu” or “cuda” for GPU computation if available.
mode{“ar”, “direct”}, optional (default=”ar”)

Forecasting mode:

  • "ar": Autoregressive mode for one-step-ahead predictions.

  • "direct": Direct mode for multi-step-ahead predictions.

pred_lenint, optional (default=None)
Prediction length, i.e., the number of future time steps to forecast. Defines the network output dimension in direct mode. In AR mode this is ignored (output is always 1). Required for pretraining in direct mode if fh is not passed to pretrain().
activationstr, optional (default=”relu”)

Activation function to apply after each linear layer. Supported values are: "relu", "leaky_relu", "elu", "selu", "tanh", "sigmoid", "gelu".

dropout_ratefloat, optional (default=0.1)
Dropout rate applied after each hidden layer. A value of 0 disables dropout.