





class UpperCAmelCase_							:


  def __init__(       self   ,__snake_case   ):



       """simple docstring"""





       A_					      =					data
       A_					      =					None
       A_					      =					None




def     UpperCAmelCase_						(						_UpperCAmelCase       :BinaryTreeNode | None     ,	_UpperCAmelCase       :int							)  ->							str:
     '''simple docstring'''


     if node is None:
          A_					      =					BinaryTreeNode(UpperCamelCase__							)
          return node

     # binary search tree is not empty,
     # so we will insert it into the tree
     # if new_value is less than value of data in node,
     #  add it to left subtree and proceed recursively
     if new_value < node.data:
          A_					      =					insert(node.left_child     ,	UpperCamelCase__							)
     else:
          # if new_value is greater than value of data in node,
          #  add it to right subtree and proceed recursively
          A_					      =					insert(node.right_child     ,	UpperCamelCase__							)
     return node

def     UpperCAmelCase_						(						_UpperCAmelCase       :None | BinaryTreeNode							)  ->							List[str]:  # if node is None,return
     '''simple docstring'''


     if node:
          A_					      =					inorder(node.left_child							)
          A_					      =					[*inorder_array, node.data]
          A_					      =					inorder_array + inorder(node.right_child							)
     else:
          A_					      =					[]
     return inorder_array

def     UpperCAmelCase_						(						)  ->							Union[str, Any]:
     '''simple docstring'''


     A_					      =					insert(UpperCamelCase__     ,	15							)
     insert(UpperCamelCase__     ,	10							)
     insert(UpperCamelCase__     ,	25							)
     insert(UpperCamelCase__     ,	6							)
     insert(UpperCamelCase__     ,	14							)
     insert(UpperCamelCase__     ,	20							)
     insert(UpperCamelCase__     ,	60							)
     return root

def     UpperCAmelCase_						(						)  ->							List[Any]:
     '''simple docstring'''


     A_					      =					make_tree()
     print('''Printing values of binary search tree in Inorder Traversal.'''							)
     inorder(UpperCamelCase__							)


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      main()










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

# Load iris file
a__			:    List[str]			      =		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
a__      ,							a__      ,							a__      ,							a__			:    Any			      =		train_test_split(
    iris['data'], iris['target'], random_state=4
)

# KNN

a__			:    List[Any]			      =		KNeighborsClassifier(n_neighbors=1)
knn.fit(X_train, y_train)

# new array to test
a__			:    Optional[Any]			      =		[[1, 2, 1, 4], [2, 3, 4, 5]]

a__			:    Union[str, Any]			      =		knn.predict(X_new)

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



