Page 1 of 1

Ask for solving an error

Posted: Wed Jul 20, 2022 1:28 pm
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

Re: Ask for solving an error

Posted: Tue Aug 02, 2022 6:32 am
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!