-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add a target_width parameter to keras.utils.timeseries_dataset_from_array #7
Comments
@To3No7, |
As part of a course I am teaching in deep learning one part is time series forecasting with RNNs. We work with the Jena weather data, following in part the Tensorflow example https://www.tensorflow.org/tutorials/structured_data/time_series. Part of this exercise is to:
Thus to do the Part 2.2 the students need to have target_width of 24 instead of 1. Some year back I have been suggesting the students should use the windowing function from the tensorflow tutorial, but this spring I suggested they use the keras function timeseries_dataset_from_array instead as that would be a more clean solution. However, as timeseries_dataset_from_array didn’t have a target_width, almost no student was able to implement a correct datasetgen for Part 2.2 and I had to quickly hack together a solution for them to use (as seen above). Is this clear enough? I might be able to provide solution code, but this have to be done privately for obvious reasons. |
@sachinprasadhs @qlzh727 @tilakrayal I'll pick this one up |
This issue is stale because it has been open for 180 days with no activity. It will be closed if no further activity occurs. Thank you. |
Feature request:
It would have been nice if there was a parameter target_width (a.k.a. label_width) for keras.utils.timeseries_dataset_from_array which allowed the target to be sequences longer than just one timestep as it now assumes. Compare to the class WindowGenerator in https://www.tensorflow.org/tutorials/structured_data/time_series which have a label_width.
This would simplify the code for the case we want to generate all intermediate timestep when predicting with a target shift, like predicting weather at hour 48 from the sequence between hour 0 and 24. That is, I want to have the target to be the full sequence 25-48 instead of just 48.
As it is now I have to make two calls to timeseries_dataset_from_array and therefore I will be missing the shuffle function like this:
The text was updated successfully, but these errors were encountered: