google-research / google-research/google-research

why to use target values when we want to predict target target values or their quantiles?

Open
#435 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
38.8k
Forks
8.5k
PR merge metrics
No merged PRs in 30d

Description

I am having difficulty in understanding that why does the `tft` code uses previous observations which are also targets? For example using electricity example, and if `total_time_steps` are 192 and `num_encoder_steps` are 168, I understand that the model uses 168 previous values to predict next 24 values (or their quantiles). But the input data i.e. `data` in line [1145](https://github.com/google-research/google-research/blob/master/tft/libs/tft_model.py#L1145) has the shape `(450000, 192, 5)` while the `labels` have shape `(450000, 24, 5)`. However the last 24 values in `data` are exactly what the 24 values of `labels` are. For validation I ran following lines of code during debugging after line [1145](https://github.com/google-research/google-research/blob/master/tft/libs/tft_model.py#L1145)

```python
for i,j in zip(data[0, -24:, 0], labels[0]):
print(np.abs(np.subtract(i,j[0])))
```
and it only prints 0s.

My question is if we are required to feed the target values as inputs, then what is the point of having a model? What am I missing?

Contributor guide

Open the contributing guide

Research direction

Start at line 1145 of libs/tft_model.py and trace how the electricity example constructs data and labels for the 192-step window. Compare the 168 encoder steps and 24 forecast steps, then document whether the overlapping target values are intentional and how the model is expected to use them.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
machine-learning
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.