

'''simple docstring'''
from collections import Counter

import numpy as np
from sklearn import datasets
from sklearn.model_selection import train_test_split

_UpperCAmelCase  :		List[Any]  =		datasets.load_iris()

_UpperCAmelCase  :		Dict  =		np.array(data['''data'''])
_UpperCAmelCase  :		Union[str, Any]  =		np.array(data['''target'''])
_UpperCAmelCase  :		int  =		data['''target_names''']

_UpperCAmelCase  , _UpperCAmelCase  , _UpperCAmelCase  , _UpperCAmelCase  :		Union[str, Any]  =		train_test_split(X, y)




def 	UpperCamelCase   (       lowercase_						:    str     ,					lowercase_						:    Optional[Any]	)		->	int:




  '''simple docstring'''



  return np.linalg.norm(np.array(lowercase_	) - np.array(lowercase_	)	)




def 	UpperCamelCase   (       lowercase_						:    Any     ,					lowercase_						:    Any     ,					lowercase_						:    int     ,					lowercase_						:    Tuple     ,					lowercase_						:    Tuple=5	)		->	List[Any]:




  '''simple docstring'''



  lowercase									=zip(lowercase_     ,					lowercase_	)
  # List of distances of all points from the point to be classified
  lowercase									=[]
  for data_point in data:
    lowercase									=euclidean_distance(data_point[0]     ,					lowercase_	)
    distances.append((distance, data_point[1])	)
  # Choosing 'k' points with the least distances.
  lowercase									=[i[1] for i in sorted(lowercase_	)[:k]]
  # Most commonly occurring class among them
  # is the class into which the point is classified
  lowercase									=Counter(lowercase_	).most_common(1	)[0][0]
  return classes[result]


if __name__ == "__main__":
     print(classifier(X_train, y_train, classes, [4.4, 3.1, 1.3, 1.4]))

def 					_snake_case	(  __snake_case = 100						):
					_UpperCamelCase			     =     (n * (n + 1) // 2) ** 2
					_UpperCamelCase			     =     n * (n + 1) * (2 * n + 1) // 6
					return sum_cubes - sum_squares


if __name__ == "__main__":
					print(f'{solution() = }')
