Goal: trying to use walk-forward validation strategy with keras tuner for time series when training a neural network (mainly LSTM and/or CNN).
Did anyone find a direct way of doing this?
One possible way I can think of is:
- implementing a custom 'objective' function, e.g. 'mean squared error' using walk-forward validations trategy
- this custom function could be passed via the 'objective' input parameter in the tuner (be it RandomSearch, BayesianOptimization, Hyperband...)
- when calling tuner.search, we pass the train & validation data, to be used in the walk-forward custom function
Thanks in advance