After conduction KNN-classification with Culmen Depth and Flipper Length to predict island with the penguin dataset and K being odd numbers from 1 to 40, I got the following F1 scores:
F1 for k = 1 is: 0.6369527889419905
F1 for k = 3 is: 0.6564557334952033
F1 for k = 5 is: 0.6394099629071051
F1 for k = 7 is: 0.6740437952239902
F1 for k = 9 is: 0.6637238043332344
F1 for k = 11 is: 0.652827362655833
F1 for k = 13 is: 0.6653557475115912
F1 for k = 15 is: 0.6612866782331365
F1 for k = 17 is: 0.6784365268515067
F1 for k = 19 is: 0.6672187824828101
F1 for k = 21 is: 0.681801594265551
F1 for k = 23 is: 0.6715811291052436
F1 for k = 25 is: 0.6775398679623122
F1 for k = 27 is: 0.6871381036629864
F1 for k = 29 is: 0.6803892409492627
F1 for k = 31 is: 0.6838159412597442
F1 for k = 33 is: 0.6785127451651337
F1 for k = 35 is: 0.6814975793610464
F1 for k = 37 is: 0.684373236146193
F1 for k = 39 is: 0.6836273700560402
After doing these tests I determined that a k of 27 is the most accurate with it having an F1 score of 0.687. Also with the F1 scores being close (at most 0.05) to each other, these K values all create similar, but not identical, predictions.
Leave a Reply