-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Predict fails with "cannot allocate vector of size..." with large number of prediction points #215
Comments
Prophet right now uses the Date data type in R, and as such only works with daily data. In this case I expect that R is converting the timestamps to all just be the same day, and might give wacky results (even if it did work). If you are willing to work with daily predictions you'd want to aggregate to daily data before passing it to Prophet. Hopefully in the near future there will be support for finer granularity data (#29), it's mostly a matter of getting rid of all of the That said, this particular issue may remain. I haven't tried to evaluate a forecast on that many datapoints. For uncertainty estimation it will construct a ~ndata x 1000 matrix which I suspect is the issue. This is something we will have to make more efficient and not hold in RAM for finer grained data. |
Support for sub-daily data (#29) is now finished in the v0.2 branch, and so this issue needs to be addressed. The issue is in calculating the lower and upper uncertainty intervals for predictions. Suppose we are making predictions on a dataframe with n_dates rows (datetimes for predictions). There is a Prophet argument uncertainty_samples that controls how many draws of future trends / posterior parameter values are used to estimate the uncertainty intervals. Prophet constructs a n_dates x uncertainty_samples matrix that is filled with these predictions. Most daily datasets will have n_dates at most a few thousand, but for sub-daily data we can easily have many thousands of datetimes in the history, and so when we (by default) make predictions on all of them and construct this n_dates x 1000 matrix, we can have RAM issues. It seems the right approach here is to chunk the prediction dataframe (so, n_dates) and compute the percentiles separately for each chunk. I think that rather than having Prophet do this, we can just catch this error (or the corresponding PR welcome! |
Hi,
I want to predict the next period data--- '2017-10-28 9:30:00 10:30:00'. But I saw the Prophet can’t predict secondly data. I have tried to adapt 'forecaster.py' ,but it can't work. I need your help,please. |
Prophet now does support second-level data, as of v0.2. You can check what version you have with
|
I appreciate you tell me this.@bletham |
@kikizxd sorry for the slow reply. This is an interesting challenge. Make sure that daily seasonality is turned on, but weekly and yearly are turned off. I would expect it to work if you have enough days of data. Otherwise you could definitely get an estimate of the daily seasonality by adjusting the dates so that they are all consecutive. This is a little off-topic for this issue though so if you'd like to discuss further go ahead and open an issue on this. |
Hi,
I am currently trying to use Prophet to predict byte flows in a network. The data set has the following properties:
The first couple of lines look as follows, with y being the number of bytes monitored in the network:
I wrote some simple R code to fit the model and predict a single period:
The model fitting works, however, during the prediction, R tries to allocate more and more memory until both Mem and Swp are fully allocated (I have a machine with 32GB of RAM, Debian 8.8 Jessie, R 3.3.3). Meanwhile, a single CPU core is at 100% load. The program will eventually crash with the following error:
I've done the same thing with the Holt-Winters prediction that's built into R already which works flawlessly and uses around 300MB of RAM.
Any ideas what the problem is here? Could it be the granularity?
The text was updated successfully, but these errors were encountered: