Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get TiDE to handle future covariates #1969

Open
StephenRogers1 opened this issue Mar 26, 2024 · 0 comments
Open

Can't get TiDE to handle future covariates #1969

StephenRogers1 opened this issue Mar 26, 2024 · 0 comments

Comments

@StephenRogers1
Copy link

StephenRogers1 commented Mar 26, 2024

I have been trying on multiple datasets to get TiDE to handle covariates as stated but I can't seem to enable this. I am using the TiDE code. In particular, I produced a dataset that simply produces the target by adding two covariates x,y and cannot recover the target, this is similar to a realistic dataset where it performs worse with covariates despite the covariates having a strong relationship with the target.

Code to reproduce:

np.random.seed(42)
x = np.random.normal(0, 1, 13308)
y = np.random.normal(0, 1, 13308)
date = pd.date_range(start='2020-01-01', periods=13308, freq='15min')
T = x + y
df = pd.DataFrame({'date': date, 'x': x, 'y': y, 'T': T})
df.to_csv('datasets/covariates.csv', index=False)
look_back=384
horizon=384
cov_cols='x, y'
target_cols='T'
ts_cols="${target_cols}, ${cov_cols}"
#!/bin/bash
python3 -m train \
    --train_epochs=0 \
    --ts_cols="${ts_cols}" \
    --num_cov_cols="${cov_cols}" \
    --transform=false \
    --layer_norm=true \
    --holiday=false \
    --dropout_rate=0.0 \
    --batch_size=512 \
    --hidden_size=512 \
    --num_layers=1 \
    --hist_len=$look_back \
    --pred_len=$horizon \
    --dataset=covariates \
    --decoder_output_dim=8 \
    --final_decoder_hidden=16 \
    --num_split=1 \
    --learning_rate=0.00003012706619800982 \
    --min_num_epochs=-1 \
    --normalize=false

In Train.py DATA_DICT

    "covariates": {
        "boundaries": [10646, 11977, 13308],
        "data_path": "./datasets/covariates.csv",
        "freq": "15min",
        "num_cov_cols": ["x", "y"],
        "ts_cols": ["T"],
        }

As you can see I added to both the DATA_DICT entry and the shell command, but neither allowed use of the covariate. The error is higher (1.3 MAE) than without covariates (1.0 MAE).

I want to use TiDE with covariates as its performance seems good, however, it seems they are either specified some other way or there is some other issue.

Thanks,
Stephen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant