Dec-25-2018, 09:05 PM
thank you so much for your continuous help
however there is still error in the code
Traceback (most recent call last):
File "C:/Users/Python/new-assignment-forum.py", line 76, in <module>
main()
File "C:/Users/Python/new-assignment-forum.py", line 75, in main
print('Nearest vale :',get_k_nearest_labels('Data.csv','Data_Labels.csv','Learning_Data.csv',1))
File "C:/Users/Python/new-assignment-forum.py", line 56, in get_k_nearest_labels
get_distance(file_open[0], item)
File "C:/Users/Python/new-assignment-forum.py", line 20, in get_distance
euclidean += pow(float(test2[i][k]) - float(test1[j][k]), 2)
IndexError: list index out of range
however there is still error in the code
Traceback (most recent call last):
File "C:/Users/Python/new-assignment-forum.py", line 76, in <module>
main()
File "C:/Users/Python/new-assignment-forum.py", line 75, in main
print('Nearest vale :',get_k_nearest_labels('Data.csv','Data_Labels.csv','Learning_Data.csv',1))
File "C:/Users/Python/new-assignment-forum.py", line 56, in get_k_nearest_labels
get_distance(file_open[0], item)
File "C:/Users/Python/new-assignment-forum.py", line 20, in get_distance
euclidean += pow(float(test2[i][k]) - float(test1[j][k]), 2)
IndexError: list index out of range