Comments (5)
Hi @akshobhya95,
The closing message from the linked issue is saying that the Darts ARIMA
model is a wrapper around statsmodel ARIMA
, which according to their own documentation, is an interface to the ARIMA-based models (including SARIMA) : here. However, Darts also adds exogenous variables support (covariates), hence making it equivalent to the SARIMAX model. The only difference is that some of SARIMAX' arguments such as time_varying_regression
, mle_regression
, simple_differencing
or hamilton_representation
are not accessible.
Does it answer your question?
from darts.
Hi @madtoinou ,
I tried with the above suggestion as mentioned over the github link, but especially with ARIMA model test I am hitting this LU decomposition error in the middle of generating forecasts specifically hitting with ARIMA models for my dataset whereas for the rest of the models it is working fine.
Generating forecasts...
C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\statsmodels\base\model.py:607: ConvergenceWarning: Maximum Likelihood optimization failed to converge. Check mle_retvals
warnings.warn("Maximum Likelihood optimization failed to "
19%|█████████████████████████▏ | 243/1266 [04:13<17:48, 1.04s/it]
Traceback (most recent call last):
File "C:\Users\aksho\anaconda3\conformal-time-series\tests\base_test.py", line 86, in
data['forecasts'] = generate_forecasts(data, **args['sequences'][0])
File "C:\Users\aksho\anaconda3\conformal-time-series\tests..\core\model_scores.py", line 90, in generate_forecasts
model_forecasts = model.historical_forecasts(y,future_covariates=exog,forecast_horizon=fit_every, retrain=retrain, verbose=True).values()[:,0].squeeze()
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\darts\utils\utils.py", line 143, in sanitized_method
return method_to_sanitize(self, *only_args.values(), **only_kwargs)
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\darts\models\forecasting\forecasting_model.py", line 1051, in historical_forecasts
model._fit_wrapper(
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\darts\models\forecasting\forecasting_model.py", line 386, in _fit_wrapper
self.fit(series=series, **add_kwargs, **kwargs)
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\darts\models\forecasting\forecasting_model.py", line 2788, in fit
return self._fit(series, future_covariates=future_covariates)
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\darts\models\forecasting\arima.py", line 167, in _fit
self.model = m.fit()
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\statsmodels\tsa\arima\model.py", line 395, in fit
res = super().fit(
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\statsmodels\tsa\statespace\mlemodel.py", line 703, in fit
mlefit = super().fit(start_params, method=method,
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\statsmodels\base\model.py", line 566, in fit
xopt, retvals, optim_settings = optimizer._fit(f, score, start_params,
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\statsmodels\base\optimizer.py", line 243, in _fit
xopt, retvals = func(objective, gradient, start_params, fargs, kwargs,
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\statsmodels\base\optimizer.py", line 660, in _fit_lbfgs
retvals = optimize.fmin_l_bfgs_b(func, start_params, maxiter=maxiter,
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\scipy\optimize_lbfgsb_py.py", line 237, in fmin_l_bfgs_b
res = _minimize_lbfgsb(fun, x0, args=args, jac=jac, bounds=bounds,
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\scipy\optimize_lbfgsb_py.py", line 407, in _minimize_lbfgsb
f, g = func_and_grad(x)
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\scipy\optimize_differentiable_functions.py", line 296, in fun_and_grad
self._update_fun()
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\scipy\optimize_differentiable_functions.py", line 262, in _update_fun
self._update_fun_impl()
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\scipy\optimize_differentiable_functions.py", line 163, in update_fun
self.f = fun_wrapped(self.x)
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\scipy\optimize_differentiable_functions.py", line 145, in fun_wrapped
fx = fun(np.copy(x), *args)
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\statsmodels\base\model.py", line 534, in f
return -self.loglike(params, *args) / nobs
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\statsmodels\tsa\statespace\mlemodel.py", line 938, in loglike
loglike = self.ssm.loglike(complex_step=complex_step, **kwargs)
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\statsmodels\tsa\statespace\kalman_filter.py", line 1001, in loglike
kfilter = self._filter(**kwargs)
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\statsmodels\tsa\statespace\kalman_filter.py", line 921, in _filter
self._initialize_state(prefix=prefix, complex_step=complex_step)
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\statsmodels\tsa\statespace\representation.py", line 1058, in _initialize_state
self._statespaces[prefix].initialize(self.initialization,
File "statsmodels\tsa\statespace\_representation.pyx", line 1373, in statsmodels.tsa.statespace._representation.dStatespace.initialize
File "statsmodels\tsa\statespace\_representation.pyx", line 1362, in statsmodels.tsa.statespace._representation.dStatespace.initialize
File "statsmodels\tsa\statespace\_initialization.pyx", line 288, in statsmodels.tsa.statespace._initialization.dInitialization.initialize
File "statsmodels\tsa\statespace\_initialization.pyx", line 406, in statsmodels.tsa.statespace._initialization.dInitialization.initialize_stationary_stationary_cov
File "statsmodels\tsa\statespace\_tools.pyx", line 1548, in statsmodels.tsa.statespace._tools._dsolve_discrete_lyapunov
numpy.linalg.LinAlgError: LU decomposition error.
But I get your point with the above explanation makes sense to me it answers my question. Thanks for your response.
-Kind Regards ,
Akshobhya.
from darts.
Hi @madtoinou ,
My bad I accidentally submitted my update with closing comments, Still I had one more query about the DARTS package used in ARIMA, as you said DARTS in ARIMA supports only fewer hyper tuning parameters for my case I was hitting this LU decomposition error as I have highlighted in above update, In one of the workarounds I need to hyper tune it by setting and check enforce_stationarity= False ARIMA
But unfortunately I don't see this hyperparameter being used in DARTS ? is my understanding right that DARTS in ARIMA only supports fewer hypertuning parameters ? else How do we set this explicitly using DARTS?
Generating forecasts...
Traceback (most recent call last):
File "C:\Users\aksho\anaconda3\conformal-time-series\tests\base_test.py", line 86, in
data['forecasts'] = generate_forecasts(data, **args['sequences'][0])
File "C:\Users\aksho\anaconda3\conformal-time-series\tests..\core\model_scores.py", line 71, in generate_forecasts
model = ARIMA(p=3,d=0,q=0,seasonal_order=(1,1,1,7),enforce_stationarity=False)
File "C:\Users\aksho\anaconda3\envs\qls\lib\site-packages\darts\models\forecasting\forecasting_model.py", line 114, in call
return super().call(**all_params)
TypeError: ARIMA.init() got an unexpected keyword argument 'enforce_stationarity'
I see that the enforce_stationarity argument is also involved in the case so kindly confirm on this check.
from darts.
Hi @akshobhya95, Darts is indeed no giving access to these arguments and I added it to the roadmap.
In the meantime, you could try to make your series stationarity so that you don't have to change the enforce_stationarity
argument.
from darts.
Sure Thanks for your Confirmation on this @madtoinou.
from darts.
Related Issues (20)
- Saving/loading model with a checkpoint callback HOT 2
- [BUG] TimeSeries should support the fill_missing_dates=False without freq HOT 1
- [BUG] Error when loading a saved TFTModel checkpoint HOT 2
- What is the difference between variable importance for the encoder and decoder in TFTExplainer? HOT 1
- Rolling prediction ;validation model HOT 1
- Tsmixer incorrect loss_fn/likelihood documentation HOT 1
- [BUG] darts should provide way to input multiprocessing_context parameter for dataloader when fit HOT 3
- [BUG] darts should support re-training base on the old checkpoint, not reset the model HOT 2
- Add KAN (Kolmogorov-Arnold Network) to Darts HOT 5
- Gridlines automatically created in matplotlib and seaborn plots [BUG] HOT 2
- How to mask or ignore target features during model training HOT 13
- Quantile forecasts are identical for all forecast horizons (XGBoost) HOT 2
- [BUG] TSMixer TimeBatchNorm2d using BatchNorm instead of LayerNorm HOT 6
- [BUG] Deterministic TFT model prediction not reproducable HOT 2
- TSMixer ConditionalMixer Skip Connections HOT 1
- [BUG] PLForecastingModule._calculate_metrics should call log_dict with batch_size HOT 2
- [BUG] TorchMetrics loop implementation isn't compatible with stateful metrics HOT 1
- [BUG] TCNModel changes the shape of data erroneously before loss evaluation HOT 3
- [BUG] TFTModel returns StopIteration on decoder_vsn() call in forward() HOT 3
- How to make TorchForecastingModel store the best model checkpoint? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from darts.