Skip to main content
SOFTSSharp extends SOFTS by stochastically adding variable-position embeddings and multiple dropout layers inside the STAD aggregation-redistribution component, aiming to improve forecasting accuracy while preserving linear complexity. Figure 1. Architecture of SOFTSSharp Figure 1. Architecture of SOFTSSharp

1. SOFTSSharp

SOFTSSharp

Bases: BaseModel SOFTSSharp SOFTS# (SOFTSSharp) extends SOFTS by stochastically adding variable-position embeddings and multiple dropout layers inside the STAD component. Parameters:

SOFTSSharp.fit

Fit. The fit method, optimizes the neural network’s weights using the initialization parameters (learning_rate, windows_batch_size, …) and the loss function as defined during the initialization. Within fit we use a PyTorch Lightning Trainer that inherits the initialization’s self.trainer_kwargs, to customize its inputs, see PL’s trainer arguments. The method is designed to be compatible with SKLearn-like classes and in particular to be compatible with the StatsForecast library. By default the model is not saving training checkpoints to protect disk memory, to get them change enable_checkpointing=True in __init__. Parameters: Returns:

SOFTSSharp.predict

Predict. Neural network prediction with PL’s Trainer execution of predict_step. Parameters: Returns:

Usage example

2. Auxiliary functions

PositionalEmbedding

Bases: Module

STADSharp

Bases: Module STar Aggregate Dispatch Module with stochastic variable-position encoding.