ValueError in Chemical_seperation code


here is my code.
Whenever I am executing gradient_descent function, it’s throwing as an error as :
operands could not be broadcast together with shapes (4,) (4,3000)
I have checked the code thoroughly many times, but unable to find the error.

hey @annudhiman ,
can you please share a screenshot of this error.

THank YOu


here is the code

you just need to small changes

first
theta , error_list = gradient_descent(X_,y_data.reshape(-1))

second
theta = theta - lr*grad

here is the corrected code.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.