Skip to content
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

Issue using es_models and SARIMAX_model #14

Open
baborok opened this issue May 8, 2022 · 1 comment
Open

Issue using es_models and SARIMAX_model #14

baborok opened this issue May 8, 2022 · 1 comment

Comments

@baborok
Copy link

baborok commented May 8, 2022

Hello can u please help me figure this out.
using es_models
Traceback (most recent call last):
File "C:\Users\petuu\Desktop\project-energy-master\es_models.py", line 216, in
mse_tes, rmse_tes, r2_tes, y_tes = triple_exponential_smoothing(season, y_test)
File "C:\Users\petuu\Desktop\project-energy-master\es_models.py", line 121, in triple_exponential_smoothing
tes_model = ExponentialSmoothing(y_test, seasonal_periods=season, trend='add', seasonal='add').fit(use_boxcox=True)
File "G:\anaconda\envs\depp-ts\lib\site-packages\pandas\util_decorators.py", line 207, in wrapper
return func(*args, **kwargs)
File "G:\anaconda\envs\depp-ts\lib\site-packages\pandas\util_decorators.py", line 207, in wrapper
return func(*args, **kwargs)
File "G:\anaconda\envs\depp-ts\lib\site-packages\pandas\util_decorators.py", line 207, in wrapper
return func(*args, **kwargs)
File "G:\anaconda\envs\depp-ts\lib\site-packages\statsmodels\tsa\holtwinters\model.py", line 1094, in fit
raise ValueError(
ValueError: use_boxcox was set at model initialization and cannot be changed

using SARIMAX_model
Traceback (most recent call last):
File "statsmodels\tsa\statespace_kalman_smoother.pyx", line 1000, in statsmodels.tsa.statespace._kalman_smoother.dKalmanSmoother.allocate_arrays
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 697. MiB for an array with shape (51, 51, 35135) and data type float64
Exception ignored in: 'statsmodels.tsa.statespace._kalman_smoother.dKalmanSmoother.reset_filter_method'
Traceback (most recent call last):
File "statsmodels\tsa\statespace_kalman_smoother.pyx", line 1000, in statsmodels.tsa.statespace._kalman_smoother.dKalmanSmoother.allocate_arrays
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 697. MiB for an array with shape (51, 51, 35135) and data type float64
Traceback (most recent call last):
File "C:\Users\petuu\Desktop\project-energy-master\sarimax_model.py", line 85, in
results = model.fit()
File "G:\anaconda\envs\depp-ts\lib\site-packages\statsmodels\tsa\statespace\mlemodel.py", line 728, in fit
res = func(mlefit.params, transformed=False, includes_fixed=False,
File "G:\anaconda\envs\depp-ts\lib\site-packages\statsmodels\tsa\statespace\mlemodel.py", line 886, in smooth
result = self.ssm.smooth(complex_step=complex_step, **kwargs)
File "G:\anaconda\envs\depp-ts\lib\site-packages\statsmodels\tsa\statespace\kalman_smoother.py", line 410, in smooth
smoother = self._smooth(smoother_output, results=results, **kwargs)
File "G:\anaconda\envs\depp-ts\lib\site-packages\statsmodels\tsa\statespace\kalman_smoother.py", line 360, in _smooth
smoother()
File "statsmodels\tsa\statespace_kalman_smoother.pyx", line 1214, in statsmodels.tsa.statespace._kalman_smoother.dKalmanSmoother.call
File "statsmodels\tsa\statespace_kalman_smoother.pyx", line 1239, in statsmodels.tsa.statespace._kalman_smoother.dKalmanSmoother.next
File "statsmodels\tsa\statespace_kalman_smoother.pyx", line 1435, in statsmodels.tsa.statespace._kalman_smoother.dKalmanSmoother.initialize_smoother_object_pointers
AttributeError: Memoryview is not initialized

@kanch91
Copy link
Owner

kanch91 commented May 10, 2022

For es_models, the use_boxcox has been deprecated since 0.12.0 release of statsmodels package. Either use a version of statsmodels compatible (pre-0.12 version) or drop the parameters in fit(). Refer this and this.

For SARIMAX_model, refer to this thread and this. Also, check the backward compatibility of the newer statsmodels with the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants