huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
131.64k stars 26.2k forks source link

PatchTST and PatchTSMixer categorical features and exogenous variables #28611

Open chrisconst2 opened 7 months ago

chrisconst2 commented 7 months ago

Feature request

Include categorical features and exogenous variables as input for the PatchTST and PatchTSMixer timeseries foundation models

Motivation

Categorical features and exogenous variables are key components in timeseries modelling

Your contribution

-

amyeroberts commented 7 months ago

@kashif

kashif commented 7 months ago

@chrisconst2 so due to the nature of patching the only potential covariates that can be included with PatchTST and I believe PatchTSMixer are going to be static features and static real-valued covariates... I believe the method is not too flexible in being able to accommodate these extra bells and whistle... what kind of exogenous variables were you thinking of using?

eromoe commented 4 months ago

@kashif There are many exogenous variables can improve the perfomace in stock / sales forecasting. For stock forecasting, the typical exogenous variables are fundamental indicator : year-on-year (YoY) growth, profit margin, earnings per share (EPS), price-to-earnings (PE) ratio, and profit after tax (PAT), etc ... For sales forecasting, could be : discount rate, with gift, gift value , balabala ...

kashif commented 4 months ago

@eromoe of course, however, this method doesn't have the inductive bias to incorporate covariates (especially temporal ones) in a straight-forward fashion. I have a variant of patch-tst called lag-tst that doesn't have this issue... https://github.com/awslabs/gluonts/tree/dev/src/gluonts/torch/model/lag_tst