KNN implementation

In the video of KNN implementation, why is there any need to reshape " Y " matrix from shape ( 399, 1 ) to ( 399, ) ?

hey @Spartan_online ,
we will be making our predictions in form of scalers and these labels are in form lists , as you can se its shape is (399,1) means 399 items with each being a list of single value.
like [[1],[2],[1],[2]] its shape will be (4,1) and we need to compare it with [ 1,3,1,2] = shape = (4,).

Hence , due to this we convert our labels to another shape to get our task done successfully.

I hope this helped You.
Thank You :slightly_smiling_face:.