Investigating Nearest Neighbors Calculation: The Comparative Study of Distance Functions