Here when in the last step y=np.mat(Y)

why is y=mp.mat(X), and it is still working,
it should be Y=np.mat(Y)

Hey @sankalparora5, yes it should be Y=np.mat(Y), the original file contains this only, If you are still unable to run it, take reference from this code and try to check line by line,

Hope this resolved your doubt.
Remember to mark it as resolved :blush:

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.