[ENH] Support tuning any model and extend LSTMModel in docs to support multi-target datasets #1449
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes my own issues:
It allows to tune "any" model, generalizing the
optimize_hypetparametersfunction fromTemporalFusionTransformermodel, and it also add a "better"LSTMModelthan the one shown in the documentation, which I tried to use on a multi-target dataset without success. My version does work on multi-target datasets, thanks to an extension toAutoRegressiveBaseModel.My version of
AutoRegressiveBaseModelinherits from the original to override a couple of methods. I should've probably just edited the original, but I'd like to hear your feedback before doing that. I'm also sure there was a simpler way forAutoRegressiveBaseModelto work with multi-target data. When I tried to just run the Documentation's example ofLSTMModelbut on a multi-target dummy dataset, it just did not work out of the box.Checklist
pre-commit install.To run hooks independent of commit, execute
pre-commit run --all-filesMake sure to have fun coding!