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

Handling of look-ahead bias #51

Closed
rhamnett opened this issue Sep 21, 2020 · 2 comments
Closed

Handling of look-ahead bias #51

rhamnett opened this issue Sep 21, 2020 · 2 comments
Labels
question Further information is requested

Comments

@rhamnett
Copy link

Hi, can I please ask how you are handling the potential for look-ahead bias in the scaling of the features etc? This seems to be a common problem in timeseries prediction. I did search the docs but couldn't find any such information. Many thanks.

@jdb78
Copy link
Owner

jdb78 commented Sep 21, 2020

Hi @rhamnett,

I should probably make this clearer in the docs and tutorial.

I think there are two answers:

  1. Either you do not care too much (maybe because your timeseries is long and stationary) and because you anyways will validate on the validation set which should have no look-ahead bias.
  2. Or you use the EncoderNormalizer that scales dynamically on each encoder sequence as you train.

Generally, I would prefer the Encoder Normalizer. However, you might accept look-ahead bias if you are having troubles to find a reasonably stable normalization or you expect a more stable normalization in inference. In the later case, you ensure that you do not learn "weird" jumps that will not be present when running inference, thus training on a more realistic data set. I hope that rational makes sense. Always happy to read a more rigorous analysis. I am sure some statistician has devoted a PhD to the topic.

@jdb78 jdb78 added the question Further information is requested label Sep 21, 2020
@jdb78
Copy link
Owner

jdb78 commented Sep 22, 2020

Added more comments in PR #54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants