



def 	a_					(							_lowerCAmelCase	)				->				str:
  __lowerCamelCase	:	Optional[Any]   	=			str(SCREAMING_SNAKE_CASE__	).strip()
  if not bin_string:
    raise ValueError('Empty string was passed to the function'	)
  __lowerCamelCase	:	List[str]   	=			bin_string[0] == '-'
  if is_negative:
    __lowerCamelCase	:	str   	=			bin_string[1:]
  if not all(char in '01' for char in bin_string	):
    raise ValueError('Non-binary value was passed to the function'	)
  __lowerCamelCase	:	Any   	=			0
  for char in bin_string:
    __lowerCamelCase	:	Dict   	=			2 * decimal_number + int(SCREAMING_SNAKE_CASE__	)
  return -decimal_number if is_negative else decimal_number


if __name__ == "__main__":
   from doctest import testmod

   testmod()











'''simple docstring'''





from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier

# Load iris file
_UpperCamelCase							    =						load_iris()
iris.keys()


print(f'''Target names: \n {iris.target_names} ''')
print(f'''\n Features: \n {iris.feature_names}''')

# Train set e Test set
_UpperCamelCase    ,    _UpperCamelCase    ,    _UpperCamelCase    ,    _UpperCamelCase							    =						train_test_split(
    iris['data'], iris['target'], random_state=4
)

# KNN

_UpperCamelCase							    =						KNeighborsClassifier(n_neighbors=1)
knn.fit(X_train, y_train)

# new array to test
_UpperCamelCase							    =						[[1, 2, 1, 4], [2, 3, 4, 5]]

_UpperCamelCase							    =						knn.predict(X_new)

print(
    f'''\nNew array: \n {X_new}\n\nTarget Names Prediction: \n'''
    f''' {iris["target_names"][prediction]}'''
)






