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

How to increase "prediction" timeframe? #8

Open
paradixe opened this issue Feb 27, 2020 · 1 comment
Open

How to increase "prediction" timeframe? #8

paradixe opened this issue Feb 27, 2020 · 1 comment

Comments

@paradixe
Copy link

Hi yacoub, how do I increase how many days or timeframe in advance the model prints out at the end?

@huw-rhys-jones
Copy link

Currently, the csv_to_dataset method in util.py uses next_day_open_values as the target output. You could add an offset to this. I modified lines 18 and 21 of this file as such:

next_day_open_values_normalised = np.array([data_normalised[:, 0][i + history_points + offset].copy() for i in range(len(data_normalised) - history_points - offset)])
next_day_open_values_normalised = np.expand_dims(next_day_open_values_normalised, -1)
next_day_open_values = np.array([data[:, 0][i + history_points + offset].copy() for i in range(len(data) - history_points - offset)])

Notice the offset variable. If you set this to 5, you are predicting values 1 week in the future (5 working days) and so on.

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

No branches or pull requests

2 participants