
"""simple docstring"""



def 					_UpperCAmelCase      ( __lowerCamelCase   :       int		)     ->					List[str]:
  _snake_case					     =       len(lowercase__		)
  for i in range(1 ,					lowercase__		):
    _snake_case					     =       collection[i]
    _snake_case					     =       0
    _snake_case					     =       i - 1

    while low <= high:
      _snake_case					     =       (low + high) // 2
      if val < collection[mid]:
        _snake_case					     =       mid - 1
      else:
        _snake_case					     =       mid + 1
    for j in range(lowercase__ ,					lowercase__ ,					-1		):
      _snake_case					     =       collection[j - 1]
    _snake_case					     =       val
  return collection


if __name__ == "__main__":
 UpperCAmelCase__          = input('Enter numbers separated by a comma:\n').strip()
 UpperCAmelCase__          = [int(item) for item in user_input.split(',')]
 print(binary_insertion_sort(unsorted))







from collections import Counter

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

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

__lowerCAmelCase	: Tuple  				=np.array(data['data'])
__lowerCAmelCase	: Dict  				=np.array(data['target'])
__lowerCAmelCase	: List[str]  				=data['target_names']

__lowerCAmelCase				,__lowerCAmelCase				,__lowerCAmelCase				,__lowerCAmelCase	: str  				=train_test_split(X, y)


def        _UpperCamelCase							(      lowercase__    ,       lowercase__      ):
						return np.linalg.norm(np.array(lowercase__      ) - np.array(lowercase__      )      )


def        _UpperCamelCase							(      lowercase__    ,       lowercase__    ,       lowercase__    ,       lowercase__    ,       lowercase__=5      ):
						__SCREAMING_SNAKE_CASE						:     Optional[int]					=		zip(lowercase__    ,       lowercase__      )
						# List of distances of all points from the point to be classified
						__SCREAMING_SNAKE_CASE						:     Dict					=		[]
						for data_point in data:
												__SCREAMING_SNAKE_CASE						:     Tuple					=		euclidean_distance(data_point[0]    ,       lowercase__      )
												distances.append((distance, data_point[1])      )
						# Choosing 'k' points with the least distances.
						__SCREAMING_SNAKE_CASE						:     int					=		[i[1] for i in sorted(lowercase__      )[:k]]
						# Most commonly occurring class among them
						# is the class into which the point is classified
						__SCREAMING_SNAKE_CASE						:     Any					=		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]))
