4.1.3. k-Nearest Neighbor

The k-NN algorithm is characterized by one major parameter, which is the *k* parameter. The neighbor search method is another parameter; however, the linear search approach based on the Euclidean distance metric was used in our study. The following *k* values were selected as *k* = 1, 3, 5, and 10. The results obtained are presented in Table 4.

**Table 4.** Performance of different k-NN parameter settings.


We observed that the same error rate (i.e, RAE and RRSE values) was obtained for parameters *k* = 1, 3, and 5. At *k* = 10, a large error rate of 100% was realized, thus implying that large *K* values are inappropriate for use under the present use case. With lower *k* values yielding the same results, it is suitable to use *k* = 1 since it presents the least computational demand for the model.
