Https://ide.codingblocks.com/s/192620

Getting two errors :
18: RuntimeWarning: divide by zero encountered in log2 and 9: RuntimeWarning: overflow encountered in exp
if name == ‘main’:

Hey @Aayush, there were two mistakes in your code.

Y_train = data[:split,-1] line 49
Y_test = data[split:,-1] line 50

and
for i in range(m): line 70

Replace the lines with the code mentioned and than your code will run fine.

Hope this cleared your doubt. :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.