In multivariate regression section video Regression - Underfitting Vs Over fitting, Generating Non-Linear Boundaries

I want to know that use of reshape in this example why sir change the shape of x and y from (-1,1) to (-1,) i want to know what is difference between them at video time 8:00

Basically to make them as vectors not matrix…

This is not mandatory step to convert into this shape (99,)…

If you remember sir was getting shape of (99,2,1) after np.stack() , at this point you can simply discard the last axis, by reshaping into (99,2) and you will also get the same thing.

You can do the either way…

Thanks :slight_smile:

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.