I am getting error in this please have a look as the dimension are not matched how dot product in the hypothesis will work? this is what i am getting error

in hypothesis(X, theta)
1 def hypothesis(X,theta):
----> 2 return np.dot(X,theta,out=None)
3
4 def error(X,y,theta):
5 e=0.0

<array_function internals> in dot(*args, **kwargs)

ValueError: shapes (10000,21) and (10000,) not aligned: 21 (dim 1) != 10000 (dim 0)

hey @YashSINGHAI ,
your weights should be of shape (21,)
as we need to multiply them with each sample we have . and update them accordingly.
So kindly look at it once.

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.