Ask for solving an error

Post Reply
adelnajafi
Posts: 1
Joined: Wed Jul 20, 2022 1:26 pm

Ask for solving an error

Post by adelnajafi »

Hi,

I hope you are doing well.
I was watching the "Feedforward ANN for Time Series Forecasting Code" in the Deep Learning Artificial Neural Network (ANN) section of your "Udemy - Time Series Analysis, Forecasting, and Machine Learning 2021-8" course. In a line when I entered "df.loc[train_idx,'Diff ANN Train Prediction'] = Ptrain"
It gives me an error stating that "ValueError: could not broadcast input array from shape (73,) into shape (39,)". I checked everything with the movie several times and everything is correct in the process of writing the code for me (I wrote it exactly the same as in the movie with the same dataset), but I don't know the reason for this error. I would be really appreciate if you help me on that.
Thank you for your kind consideration.

Regards,
Adel
lazyprogrammer
Site Admin
Posts: 141
Joined: Sat Jul 28, 2018 3:46 am

Re: Ask for solving an error

Post by lazyprogrammer »

Thanks for your inquiry.

Please note that the #1 source of student error is copying code incorrectly. Therefore, the first thing one should always do is cross-reference with the working code.

Let us know if that doesn't work, or if you found that the official code is not working.

Cheers!
Post Reply

Return to “Time Series Analysis, Forecasting, and Machine Learning”