0

I would like to estimate parameters for Holt-Winters exponential smoothing. I saw that R offers ets() function that estimates the model parameters. I work with python in Jupyter notebook. I need to know if there is a way to import this function from R.

AkselA
  • 8,153
  • 2
  • 21
  • 34
Yana
  • 785
  • 8
  • 23
  • maybe https://stackoverflow.com/questions/11561258/r-python-install-packages-on-rpy2 may help – Stoner Nov 21 '19 at 09:07
  • I have tried but I have a problem installing rpy2 in the first place. I see that one user solved it with environment variables but I am not that experienced to know what he means, without seeing it. – Yana Nov 21 '19 at 09:26
  • Does this answer your question? [Holt-Winters time series forecasting with statsmodels](https://stackoverflow.com/questions/50785479/holt-winters-time-series-forecasting-with-statsmodels) – AkselA Nov 21 '19 at 09:54
  • @AkselA It is not working for me for two reasons. I need to estimate the best parameters. But even if I decide to hard code it, I still get an error because of this line: pred = hw_model.predict(start=test.index[0], end=test.index[-1]). The error: 'The `start` argument could not be matched to a location related to the index of the data.' – Yana Nov 21 '19 at 10:12
  • @Yana: I suggest you ask a question about how to solve that then. I'm I afraid I can't help you with Python code. – AkselA Nov 21 '19 at 10:14
  • @AkselA Thank you. I will check some other options too. – Yana Nov 21 '19 at 10:16
  • `ExponentialSmoothing` should optimize the parameters for you by default. Have you worked through an example like the one I linked to? – AkselA Nov 21 '19 at 10:34

0 Answers0