from __future__ import annotations

lowercase__      :    List[str]          =     "Alexander Joslin"

def        SCREAMING_SNAKE_CASE_					(						snake_case__ :    int							)					->     int:



							if number <= 0:
														lowerCAmelCase     		=		f"n must be greater than 0. Got n = {number}"
														raise ValueError(UpperCamelCase_							)

							lowerCAmelCase     		=		[number + 1] * (number + 1)

							# starting position
							lowerCAmelCase     		=		0
							for i in range(1       ,  UpperCamelCase_							):
														lowerCAmelCase     		=		min(table[i + 1]       ,  table[i] + 1							)
														# check if out of bounds
														if i * 2 <= number:
																					lowerCAmelCase     		=		min(table[i * 2]       ,  table[i] + 1							)
														# check if out of bounds
														if i * 3 <= number:
																					lowerCAmelCase     		=		min(table[i * 3]       ,  table[i] + 1							)
							return table[number]


if __name__ == "__main__":
	import doctest

	doctest.testmod()




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

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

# KNN

lowercase__      :    int          =     KNeighborsClassifier(n_neighbors=1)
knn.fit(X_train, y_train)

# new array to test
lowercase__      :    List[str]          =     [[1, 2, 1, 4], [2, 3, 4, 5]]

lowercase__      :    int          =     knn.predict(X_new)

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



