Prophet: Sort and no-sort data return different prediction

Created on 5 Jul 2017  路  5Comments  路  Source: facebook/prophet

For some reason, if I sort the train DataFrame before the training, the prophet return different result.
Jupyter notebook with all the code and the result is attach.
fb_prophet.pdf

Most helpful comment

I also am having a hard time figuring out what might be happening here, since the very first thing that is done when fitting to a dataframe is that the dataframe is sorted. Is there a dataset you could attach here in which you are able to produce this issue?

All 5 comments

@oshribr

I can't replicate the results you obtained ...

It's weird because sorting beforehand your values or not, your Prophet instance by default sorts the rows of your data frame w.r.t the values of the columnds which are considered as (actually casted to) datetime objects:
https://github.com/facebookincubator/prophet/blob/master/python/fbprophet/forecaster.py#L180

Since you first turn your ds strings to datetime objects using the right format, I am puzzled by your results.

I also am having a hard time figuring out what might be happening here, since the very first thing that is done when fitting to a dataframe is that the dataframe is sorted. Is there a dataset you could attach here in which you are able to produce this issue?

The csv file is in the zip.
Thanks.
prophet_train.zip

@bletham any progress ?

@oshribr thanks for attaching the data and the code. I'm not able to replicate this issue. I wonder if perhaps it is the effect of some bug that has been fixed. Is fbprophet.__version__ 0.1.1? If not then could you upgrade with pip, and if so then could you download the latest from github and install from here?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

annabednarska picture annabednarska  路  3Comments

davidjayjackson picture davidjayjackson  路  3Comments

andmib picture andmib  路  3Comments

andrew-pollock picture andrew-pollock  路  3Comments

robertdknight picture robertdknight  路  3Comments