facebook / prophet

Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.
https://facebook.github.io/prophet
MIT License
18.51k stars 4.53k forks source link

AttributeError: 'Prophet' object has no attribute 'plot_yearly' #1303

Closed Manolo1182 closed 4 years ago

Manolo1182 commented 4 years ago

Hi, I am trying to plot using fbprophet and I keep gettiong this error when trying to peplicate WillKoehrsen/ Data-Analysis https://github.com/WillKoehrsen/DataAnalysis/tree/master/additive_models ''' gm_prophet.plot_yearly(); plt.title('GM Yearly Component of Market Cap'); Traceback (most recent call last):

File "", line 1, in gm_prophet.plot_yearly(); plt.title('GM Yearly Component of Market Cap');

AttributeError: 'Prophet' object has no attribute 'plot_yearly' '''

Does anyone knows if the attribute was deprecated or replaced?

Thanks in advance!

bletham commented 4 years ago

Yes, that attribute was deprecated a couple versions ago. It is now available in fbprophet.plot: https://github.com/facebook/prophet/blob/6070b5a3092a6408a6130f3e74f589a6c3dc7460/python/fbprophet/plot.py#L308-L327

So you can do

from fbprophet.plot import plot_yearly
plot_yearly(gm_prophet)
Manolo1182 commented 4 years ago

Thank you, It worked great!