Skip to main content
Figure 1. Architecture of SOFTS. Figure 1. Architecture of SOFTS.

1. TimeMixer

TimeMixer

Bases: BaseModel TimeMixer Parameters:

TimeMixer.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:

TimeMixer.predict

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

Usage example

Using cross_validation to forecast multiple historic values.

2. Auxiliary Functions

2.1 Embedding

DataEmbedding_wo_pos

Bases: Module DataEmbedding_wo_pos

DFT_series_decomp

Bases: Module Series decomposition block

2.2 Mixing

PastDecomposableMixing

Bases: Module PastDecomposableMixing

MultiScaleTrendMixing

Bases: Module Top-down mixing trend pattern

MultiScaleSeasonMixing

Bases: Module Bottom-up mixing season pattern