-
Notifications
You must be signed in to change notification settings - Fork 84
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
Generate recursive forecasts in chunks #197
Generate recursive forecasts in chunks #197
Conversation
…first set of complete data
Two other much more minor ideas for potential performance improvements are:
Edit: I updated the pull request to incorporate these performance improvements as well. |
…modify .transform so that it it only ever called on the minimum necessary number of rows of .temp_new_data
…elevant variables
I'm running the checks on this... I want to see if anything breaks. |
Well that didn't go well. :( Looks like the |
Hmmm, I'm not sure. It's tough for me to tell. But you can certainly keep trying. I appreciate your work. |
…e are too many ways in which data can be passed that makes infering it from new_data difficult
So the only way I could get it to work was to add an explicit I added tests for the case when Anyway, this is as close to working as I'm probably going to be able to get it without some help or direction. |
Circling back... I'm running the tests. The main thing I need to make sure is that there's backwards compatibility meaning that Regarding testing locally, you'll need to run Build > Check |
Ok, I'm still noodling on this, though. Specifically, I didn't realize there are some recursive methods in modeltime-refit.R that need to be updated. |
I've got it to the point where |
OK, the spark tests I can get running. Java is a pain. I agree with writing a couple of tests just to see what happens. The global variables are an easy fix. You can just add them to the global_variables.R file and that should go away. Or I can add them. Either way I'm not worried about that issue. The main thing is making sure my code doesn't break and that you have your additions tested to ensure they are properly working. |
… in new_data either is not even or is unusually small
I caught a few additional edge cases and added tests for them (when the number of rows in new_data is unusually small), and everything seems to be passing, except spark stuff on the mac-OS build. It seems fine to me so far (I've been using the branch myself) but if you have ideas of other edge cases you'd like tests for, let me know and I can work on writing them. |
I've merged this PR. Tests are passing. And performance improvement should be very high in certain scenarios. |
Hi @joranE , I'm running into an issue with The challenge is to upgrade the recursive forecast in chunks for ensembles. I'd like your help if possible. |
I think I have this solved. |
Looks at new_data for the number of complete rows to determine the chunk size, then generates the predicted values in chunks. It leads to some significant performance improvements in cases where the lags used aren't necessarily consecutive (i.e. if you have lags 5, 10 & 15 in your recipe, this will generate predictions in chunks of 5).