






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

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

# KNN

_lowerCAmelCase							:      Tuple						=	KNeighborsClassifier(n_neighbors=1)
knn.fit(X_train, y_train)

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

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

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







def      __snake_case						(					_lowerCAmelCase : float				,				_lowerCAmelCase : float				,				_lowerCAmelCase : int	) ->						float:
   A_					:				List[str]          =			[1 / first_term]
   A_					:				Tuple          =			1 / first_term
   for _ in range(number_of_terms - 1	):
      first_term += common_difference
      arithmetic_progression.append(_lowerCAmelCase	)
   A_					:				List[str]          =			[1 / step for step in arithmetic_progression]
   return sum(_lowerCAmelCase	)


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 print(sum_of_harmonic_progression(1 / 2, 2, 2))
