unit8co / darts

A python library for user-friendly forecasting and anomaly detection on time series.
https://unit8co.github.io/darts/
Apache License 2.0
7.92k stars 860 forks source link

[BUG] #1037

Closed salsa360 closed 2 years ago

salsa360 commented 2 years ago

Describe the bug When running ARIMA, I get an error message - TypeError: new() got an unexpected keyword argument 'p'.

To Reproduce model_arima = ARIMA(p=0, d=2, q=2)

model_arima.fit(train) prediction_arima = model_arima.predict(len(val))

System (please complete the following information):

hrzn commented 2 years ago

Could you update Darts doing pip install -U darts

salsa360 commented 2 years ago

I updated Darts as suggested but the same issue persists even with running DARTS in Google Colab.

hrzn commented 2 years ago

Could you then provide a fully self-contained code snippet to reproduce the issue, as well as the full stacktrace of the error you obtain? Are you sure the ARIMA symbol is really the Darts model and not another import?

salsa360 commented 2 years ago

Hi Julien,

Thanks for responding.

Attached is my ipynb file and input date file. Listed below are the error messages I am getting.

ERROR MESSAGE 1

ImportError Traceback (most recent call last)

in 14 15 from darts import TimeSeries ---> 16 from darts.models import ( 17 NBEATSModel, 18 TCNModel, ImportError: cannot import name 'Prophet' from 'darts.models' (/usr/local/lib/python3.7/dist-packages/darts/models/__init__.py) *ERROR MESSAGE 2* model_arima = ARIMA(p = ARIMA_results1.get_params().get("order")[0], d = ARIMA_results1.get_params().get("order")[1], q = ARIMA_results1.get_params().get("order")[2], trend='ct' ) model_arima.fit(train) prediction_arima = model_arima.predict(len(val)) series.plot(label='Actual') prediction_arima.plot(label='ARIMA Forecasting', lw=2) plt.legend() plt.show() print("Coefficient of Variation for ARIMA: {:.1f}%.".format (coefficient_of_variation(val, prediction_arima))) # CoV (% Error) print("Mean Absolute Scaled Error for ARIMA: {:.1f}%.".format (mase(val, prediction_arima, train))) # MASE TypeError Traceback (most recent call last) in 4 d = ARIMA_results1.get_params().get("order")[1], 5 q = ARIMA_results1.get_params().get("order")[2], ----> 6 trend='ct' 7 ) 8 TypeError: __init__() got an unexpected keyword argument 'p' Thank you. Regards Kushwant On Tue, Jun 28, 2022 at 12:54 AM Julien Herzen ***@***.***> wrote: > Could you then provide a fully self-contained code snippet to reproduce > the issue, as well as the full stacktrace of the error you obtain? > Are you sure the ARIMA symbol is really the Darts model and not another > import? > > — > Reply to this email directly, view it on GitHub > , > or unsubscribe > > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >