Skip to content

FFTS model does not support flexible prediction length #5

@WearTheClo

Description

@WearTheClo

Description

The FFTSModel in models/ffts_model.py does not accept a pred_len parameter for specifying the prediction sequence length. The prediction head is hardcoded to use max_len (input sequence length), making it an equal-length prediction model only.

Current behavior

class FFTSModel(nn.Module):
    def __init__(self, feat_dim, max_len, d_model, n_heads, num_layers,
                 patch_len=16, stride=8, dropout=0.1, activation='gelu',
                 num_experts=4, top_k=2):
        ...
        # Prediction head hardcodes target_window = max_len
        self.head = FlattenHead(feat_dim, self.head_nf, max_len, head_dropout=dropout)

This means the model can only predict sequences of the same length as the input, which is inconsistent with other SOTA models in the time series forecasting (PiXTime, TimeXer, PatchTST, iTransformer, etc.) that support flexible prediction lengths.

Files affected

  • models/ffts_model.py: FFTSModel.init, FFTSModel.forward

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions