evgeniya1 / crude_oil_price_prediction

Time Series Modeling: Crude oil price prediction
5 stars 3 forks source link

cannot save and load LSTM regres #1

Open mukhrizizraf opened 3 years ago

mukhrizizraf commented 3 years ago

Hi , I got this issue when running your code with your data: "FileNotFoundError: [Errno 2] No such file or directory: 'LSTM_trained_regres/models/lstm_input25_shift0_w8_out5.pkl'"

I managed to load all libraries buut couldnt proceed Capture )

evgeniya1 commented 3 years ago

Hi,

Regarding your question about the github code that I posted. I checked that "LSTM_trained_regres/models/lstm_input25_shift0_w8_out5.pkl" file is present in the github repository.

Therefore:

  1. Check that you downloaded or cloned everything correctly from github
  2. Check that you specified the correct local path to that folder.

Best, Evgeniya

On Fri, Apr 30, 2021 at 9:53 AM mukhrizizraf @.***> wrote:

Hi , I got this issue when running your code with your data: "FileNotFoundError: [Errno 2] No such file or directory: 'LSTM_trained_regres/models/lstm_input25_shift0_w8_out5.pkl'"

I managed to load all libraries buut couldnt proceed [image: Capture] https://user-images.githubusercontent.com/55862474/116720770-26f8c100-aa0f-11eb-91a4-605ddb8e5e1a.PNG )

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/evgeniya1/crude_oil_price_prediction/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHG5XJUK6TVBXJ7ZDZXTT4TTLLG6NANCNFSM434Q5ADA .

mukhrizizraf commented 3 years ago

Hi Evgeniya,

Thank you for the explanation. I was under the impression that the file will be generated when I run the codes. I tried using my own recent daily oil price data and got the mentioned error

I will copy those files in my folder and try running the codes again. Many thanks for the heads up.

Regards Mukhriz

On Sat, May 8, 2021 at 12:43 AM evgeniya1 @.***> wrote:

Hi,

Regarding your question about the github code that I posted. I checked that "LSTM_trained_regres/models/lstm_input25_shift0_w8_out5.pkl" file is present in the github repository.

Therefore:

  1. Check that you downloaded or cloned everything correctly from github
  2. Check that you specified the correct local path to that folder.

Best, Evgeniya

On Fri, Apr 30, 2021 at 9:53 AM mukhrizizraf @.***> wrote:

Hi , I got this issue when running your code with your data: "FileNotFoundError: [Errno 2] No such file or directory: 'LSTM_trained_regres/models/lstm_input25_shift0_w8_out5.pkl'"

I managed to load all libraries buut couldnt proceed [image: Capture] < https://user-images.githubusercontent.com/55862474/116720770-26f8c100-aa0f-11eb-91a4-605ddb8e5e1a.PNG

)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/evgeniya1/crude_oil_price_prediction/issues/1, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AHG5XJUK6TVBXJ7ZDZXTT4TTLLG6NANCNFSM434Q5ADA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/evgeniya1/crude_oil_price_prediction/issues/1#issuecomment-834611087, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKGJSRDZ64P2ICOHEHUY5TTMQKDLANCNFSM434Q5ADA .

mukhrizizraf commented 3 years ago

Hi Evgeniya,

In your ARIMA codes, I managed to run successfully. However , I am wondering how you determine the order of P,D, Q from sarimax?

You chose 4,1,1 in the model.

print('ARIMA ({},{},{}) - AIC = {}, MAPE =

{}'.format(p,d,q,AIC[-1],MAPE[-1]))

How do you extract this information

Many thanks Mukhriz

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Sat, May 8, 2021 at 10:30 AM mukhriz izraf @.***> wrote:

Hi Evgeniya,

Thank you for the explanation. I was under the impression that the file will be generated when I run the codes. I tried using my own recent daily oil price data and got the mentioned error

I will copy those files in my folder and try running the codes again. Many thanks for the heads up.

Regards Mukhriz

On Sat, May 8, 2021 at 12:43 AM evgeniya1 @.***> wrote:

Hi,

Regarding your question about the github code that I posted. I checked that "LSTM_trained_regres/models/lstm_input25_shift0_w8_out5.pkl" file is present in the github repository.

Therefore:

  1. Check that you downloaded or cloned everything correctly from github
  2. Check that you specified the correct local path to that folder.

Best, Evgeniya

On Fri, Apr 30, 2021 at 9:53 AM mukhrizizraf @.***> wrote:

Hi , I got this issue when running your code with your data: "FileNotFoundError: [Errno 2] No such file or directory: 'LSTM_trained_regres/models/lstm_input25_shift0_w8_out5.pkl'"

I managed to load all libraries buut couldnt proceed [image: Capture] < https://user-images.githubusercontent.com/55862474/116720770-26f8c100-aa0f-11eb-91a4-605ddb8e5e1a.PNG

)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/evgeniya1/crude_oil_price_prediction/issues/1, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AHG5XJUK6TVBXJ7ZDZXTT4TTLLG6NANCNFSM434Q5ADA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/evgeniya1/crude_oil_price_prediction/issues/1#issuecomment-834611087, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKGJSRDZ64P2ICOHEHUY5TTMQKDLANCNFSM434Q5ADA .

evgeniya1 commented 3 years ago

Hi Mukhriz,

I used autocorrelation and partial autocorrelation plots to get the best values for P, D, Q parameters. It did not upload this study. You can read about it from other sources, e.g.: https://machinelearningmastery.com/gentle-introduction-autocorrelation-partial-autocorrelation/

Regards, Evgeniya

On Sat, May 15, 2021 at 11:49 PM mukhrizizraf @.***> wrote:

Hi Evgeniya,

In your ARIMA codes, I managed to run successfully. However , I am wondering how you determine the order of P,D, Q from sarimax?

You chose 4,1,1 in the model.

print('ARIMA ({},{},{}) - AIC = {}, MAPE =

{}'.format(p,d,q,AIC[-1],MAPE[-1]))

How do you extract this information

Many thanks Mukhriz

< https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail

Virus-free. www.avast.com < https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Sat, May 8, 2021 at 10:30 AM mukhriz izraf @.***> wrote:

Hi Evgeniya,

Thank you for the explanation. I was under the impression that the file will be generated when I run the codes. I tried using my own recent daily oil price data and got the mentioned error

I will copy those files in my folder and try running the codes again. Many thanks for the heads up.

Regards Mukhriz

On Sat, May 8, 2021 at 12:43 AM evgeniya1 @.***> wrote:

Hi,

Regarding your question about the github code that I posted. I checked that "LSTM_trained_regres/models/lstm_input25_shift0_w8_out5.pkl" file is present in the github repository.

Therefore:

  1. Check that you downloaded or cloned everything correctly from github
  2. Check that you specified the correct local path to that folder.

Best, Evgeniya

On Fri, Apr 30, 2021 at 9:53 AM mukhrizizraf @.***> wrote:

Hi , I got this issue when running your code with your data: "FileNotFoundError: [Errno 2] No such file or directory: 'LSTM_trained_regres/models/lstm_input25_shift0_w8_out5.pkl'"

I managed to load all libraries buut couldnt proceed [image: Capture] <

https://user-images.githubusercontent.com/55862474/116720770-26f8c100-aa0f-11eb-91a4-605ddb8e5e1a.PNG

)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/evgeniya1/crude_oil_price_prediction/issues/1, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AHG5XJUK6TVBXJ7ZDZXTT4TTLLG6NANCNFSM434Q5ADA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/evgeniya1/crude_oil_price_prediction/issues/1#issuecomment-834611087 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ANKGJSRDZ64P2ICOHEHUY5TTMQKDLANCNFSM434Q5ADA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/evgeniya1/crude_oil_price_prediction/issues/1#issuecomment-841772519, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHG5XJSZTGEXI2P5ZUXEJTLTN5MHFANCNFSM434Q5ADA .

mukhrizizraf commented 3 years ago

Hi Evgeniya,

Thank you for the explanation. I will check it out.

One last question, would I be able to get out of sample forecast from the ARIMA model?

Let say if the my data ends on 15th May 2021, can i get predicted price for, eg. 16th May 2021 from the model you created?

I am very grateful of your help in answering my questions. it helps me a lot to learn forecasting.

Many thanks

Regards Mukhriz

On Tue, May 18, 2021, 6:04 AM evgeniya1 @.***> wrote:

Hi Mukhriz,

I used autocorrelation and partial autocorrelation plots to get the best values for P, D, Q parameters. It did not upload this study. You can read about it from other sources, e.g.:

https://machinelearningmastery.com/gentle-introduction-autocorrelation-partial-autocorrelation/

Regards, Evgeniya

On Sat, May 15, 2021 at 11:49 PM mukhrizizraf @.***> wrote:

Hi Evgeniya,

In your ARIMA codes, I managed to run successfully. However , I am wondering how you determine the order of P,D, Q from sarimax?

You chose 4,1,1 in the model.

print('ARIMA ({},{},{}) - AIC = {}, MAPE =

{}'.format(p,d,q,AIC[-1],MAPE[-1]))

How do you extract this information

Many thanks Mukhriz

<

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail

Virus-free. www.avast.com <

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Sat, May 8, 2021 at 10:30 AM mukhriz izraf @.***> wrote:

Hi Evgeniya,

Thank you for the explanation. I was under the impression that the file will be generated when I run the codes. I tried using my own recent daily oil price data and got the mentioned error

I will copy those files in my folder and try running the codes again. Many thanks for the heads up.

Regards Mukhriz

On Sat, May 8, 2021 at 12:43 AM evgeniya1 @.***> wrote:

Hi,

Regarding your question about the github code that I posted. I checked that "LSTM_trained_regres/models/lstm_input25_shift0_w8_out5.pkl" file is present in the github repository.

Therefore:

  1. Check that you downloaded or cloned everything correctly from github
  2. Check that you specified the correct local path to that folder.

Best, Evgeniya

On Fri, Apr 30, 2021 at 9:53 AM mukhrizizraf @.***> wrote:

Hi , I got this issue when running your code with your data: "FileNotFoundError: [Errno 2] No such file or directory: 'LSTM_trained_regres/models/lstm_input25_shift0_w8_out5.pkl'"

I managed to load all libraries buut couldnt proceed [image: Capture] <

https://user-images.githubusercontent.com/55862474/116720770-26f8c100-aa0f-11eb-91a4-605ddb8e5e1a.PNG

)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/evgeniya1/crude_oil_price_prediction/issues/1, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AHG5XJUK6TVBXJ7ZDZXTT4TTLLG6NANCNFSM434Q5ADA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <

https://github.com/evgeniya1/crude_oil_price_prediction/issues/1#issuecomment-834611087

,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ANKGJSRDZ64P2ICOHEHUY5TTMQKDLANCNFSM434Q5ADA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/evgeniya1/crude_oil_price_prediction/issues/1#issuecomment-841772519 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AHG5XJSZTGEXI2P5ZUXEJTLTN5MHFANCNFSM434Q5ADA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/evgeniya1/crude_oil_price_prediction/issues/1#issuecomment-842672535, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKGJSUZVGJHJGYKTV2MZOLTOGHIDANCNFSM434Q5ADA .

evgeniya1 commented 3 years ago

Mukhriz,

I build two different models: predict 5 days in advance (see CV_arima/y_smooth_w8_train_506_test_5_cv_100/) and predict 22 days in advance (see CV_arima/y_smooth_w8_train_506_test_22_cv_100/) for smoothed price data with window 8. Yes, you can use coefficients stored in coeff.csv in each case, For example, for the first case (5 days in advance) if data ends on 15th May 2021 you can predict price dates: for 16th May 2021 - 20th May 2021.

Regards, Evgeniya

On Mon, May 17, 2021 at 4:56 PM mukhrizizraf @.***> wrote:

Hi Evgeniya,

Thank you for the explanation. I will check it out.

One last question, would I be able to get out of sample forecast from the ARIMA model?

Let say if the my data ends on 15th May 2021, can i get predicted price for, eg. 16th May 2021 from the model you created?

I am very grateful of your help in answering my questions. it helps me a lot to learn forecasting.

Many thanks

Regards Mukhriz

On Tue, May 18, 2021, 6:04 AM evgeniya1 @.***> wrote:

Hi Mukhriz,

I used autocorrelation and partial autocorrelation plots to get the best values for P, D, Q parameters. It did not upload this study. You can read about it from other sources, e.g.:

https://machinelearningmastery.com/gentle-introduction-autocorrelation-partial-autocorrelation/

Regards, Evgeniya

On Sat, May 15, 2021 at 11:49 PM mukhrizizraf @.***> wrote:

Hi Evgeniya,

In your ARIMA codes, I managed to run successfully. However , I am wondering how you determine the order of P,D, Q from sarimax?

You chose 4,1,1 in the model.

print('ARIMA ({},{},{}) - AIC = {}, MAPE =

{}'.format(p,d,q,AIC[-1],MAPE[-1]))

How do you extract this information

Many thanks Mukhriz

<

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail

Virus-free. www.avast.com <

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Sat, May 8, 2021 at 10:30 AM mukhriz izraf @.***> wrote:

Hi Evgeniya,

Thank you for the explanation. I was under the impression that the file will be generated when I run the codes. I tried using my own recent daily oil price data and got the mentioned error

I will copy those files in my folder and try running the codes again. Many thanks for the heads up.

Regards Mukhriz

On Sat, May 8, 2021 at 12:43 AM evgeniya1 @.***> wrote:

Hi,

Regarding your question about the github code that I posted. I checked that "LSTM_trained_regres/models/lstm_input25_shift0_w8_out5.pkl" file is present in the github repository.

Therefore:

  1. Check that you downloaded or cloned everything correctly from github
  2. Check that you specified the correct local path to that folder.

Best, Evgeniya

On Fri, Apr 30, 2021 at 9:53 AM mukhrizizraf @.***> wrote:

Hi , I got this issue when running your code with your data: "FileNotFoundError: [Errno 2] No such file or directory: 'LSTM_trained_regres/models/lstm_input25_shift0_w8_out5.pkl'"

I managed to load all libraries buut couldnt proceed [image: Capture] <

https://user-images.githubusercontent.com/55862474/116720770-26f8c100-aa0f-11eb-91a4-605ddb8e5e1a.PNG

)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/evgeniya1/crude_oil_price_prediction/issues/1, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AHG5XJUK6TVBXJ7ZDZXTT4TTLLG6NANCNFSM434Q5ADA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <

https://github.com/evgeniya1/crude_oil_price_prediction/issues/1#issuecomment-834611087

,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ANKGJSRDZ64P2ICOHEHUY5TTMQKDLANCNFSM434Q5ADA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/evgeniya1/crude_oil_price_prediction/issues/1#issuecomment-841772519 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AHG5XJSZTGEXI2P5ZUXEJTLTN5MHFANCNFSM434Q5ADA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/evgeniya1/crude_oil_price_prediction/issues/1#issuecomment-842672535, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKGJSUZVGJHJGYKTV2MZOLTOGHIDANCNFSM434Q5ADA .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

mukhrizizraf commented 3 years ago

Hi Evgeniya,

Thank you for the swift response. I will check it and hopefully will be able to figure it out.

Regards Mukhriz

On Tue, May 18, 2021, 7:20 AM evgeniya1 @.***> wrote:

Mukhriz,

I build two different models: predict 5 days in advance (see CV_arima/y_smooth_w8_train_506_test_5_cv_100/) and predict 22 days in advance (see CV_arima/y_smooth_w8_train_506_test_22_cv_100/) for smoothed price data with window 8. Yes, you can use coefficients stored in coeff.csv in each case, For example, for the first case (5 days in advance) if data ends on 15th May 2021 you can predict price dates: for 16th May 2021 - 20th May 2021.

Regards, Evgeniya

On Mon, May 17, 2021 at 4:56 PM mukhrizizraf @.***> wrote:

Hi Evgeniya,

Thank you for the explanation. I will check it out.

One last question, would I be able to get out of sample forecast from the ARIMA model?

Let say if the my data ends on 15th May 2021, can i get predicted price for, eg. 16th May 2021 from the model you created?

I am very grateful of your help in answering my questions. it helps me a lot to learn forecasting.

Many thanks

Regards Mukhriz

On Tue, May 18, 2021, 6:04 AM evgeniya1 @.***> wrote:

Hi Mukhriz,

I used autocorrelation and partial autocorrelation plots to get the best values for P, D, Q parameters. It did not upload this study. You can read about it from other sources, e.g.:

https://machinelearningmastery.com/gentle-introduction-autocorrelation-partial-autocorrelation/

Regards, Evgeniya

On Sat, May 15, 2021 at 11:49 PM mukhrizizraf @.***> wrote:

Hi Evgeniya,

In your ARIMA codes, I managed to run successfully. However , I am wondering how you determine the order of P,D, Q from sarimax?

You chose 4,1,1 in the model.

print('ARIMA ({},{},{}) - AIC = {}, MAPE =

{}'.format(p,d,q,AIC[-1],MAPE[-1]))

How do you extract this information

Many thanks Mukhriz

<

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail

Virus-free. www.avast.com <

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Sat, May 8, 2021 at 10:30 AM mukhriz izraf @.***> wrote:

Hi Evgeniya,

Thank you for the explanation. I was under the impression that the file will be generated when I run the codes. I tried using my own recent daily oil price data and got the mentioned error

I will copy those files in my folder and try running the codes again. Many thanks for the heads up.

Regards Mukhriz

On Sat, May 8, 2021 at 12:43 AM evgeniya1 @.***> wrote:

Hi,

Regarding your question about the github code that I posted. I checked that "LSTM_trained_regres/models/lstm_input25_shift0_w8_out5.pkl" file is present in the github repository.

Therefore:

  1. Check that you downloaded or cloned everything correctly from github
  2. Check that you specified the correct local path to that folder.

Best, Evgeniya

On Fri, Apr 30, 2021 at 9:53 AM mukhrizizraf @.***> wrote:

Hi , I got this issue when running your code with your data: "FileNotFoundError: [Errno 2] No such file or directory: 'LSTM_trained_regres/models/lstm_input25_shift0_w8_out5.pkl'"

I managed to load all libraries buut couldnt proceed [image: Capture] <

https://user-images.githubusercontent.com/55862474/116720770-26f8c100-aa0f-11eb-91a4-605ddb8e5e1a.PNG

)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/evgeniya1/crude_oil_price_prediction/issues/1>, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AHG5XJUK6TVBXJ7ZDZXTT4TTLLG6NANCNFSM434Q5ADA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <

https://github.com/evgeniya1/crude_oil_price_prediction/issues/1#issuecomment-834611087

,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ANKGJSRDZ64P2ICOHEHUY5TTMQKDLANCNFSM434Q5ADA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <

https://github.com/evgeniya1/crude_oil_price_prediction/issues/1#issuecomment-841772519

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AHG5XJSZTGEXI2P5ZUXEJTLTN5MHFANCNFSM434Q5ADA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/evgeniya1/crude_oil_price_prediction/issues/1#issuecomment-842672535 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ANKGJSUZVGJHJGYKTV2MZOLTOGHIDANCNFSM434Q5ADA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/evgeniya1/crude_oil_price_prediction/issues/1#issuecomment-842705707, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKGJSUVVG4VYBZBZRU4VJTTOGQDXANCNFSM434Q5ADA .