Created
March 23, 2020 04:06
-
-
Save lylayang/d0b55bed7581fe8623f6ddde29ceb53d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from statsmodels.tsa.api import ExponentialSmoothing | |
fit1 = ExponentialSmoothing(np.asarray(train['Spend']) ,seasonal_periods=7 ,trend='add', seasonal='add').fit(use_boxcox=True) | |
test['Holt_Winter'] = fit1.forecast(len(test)) | |
plt.figure(figsize=(16,8)) | |
plt.plot( train['Spend'], label='Train') | |
plt.plot(test['Spend'], label='Test') | |
plt.plot(test['Holt_Winter'], label='Holt_Winter') | |
plt.legend(loc='best') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment