"""simple docstring"""


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

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

# KNN

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

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

a							=knn.predict(X_new)

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



"""simple docstring"""


def       lowerCamelCase_			( __lowerCAmelCase    )							-> bool:




						'''simple docstring'''



						if not isinstance(__lowerCAmelCase       ,   __lowerCAmelCase    ):
												raise ValueError("Input series is not valid, valid series - [2, 4, 8]"    )
						if len(__lowerCAmelCase    ) == 0:
												raise ValueError("Input list must be a non empty list"    )
						if len(__lowerCAmelCase    ) == 1:
												return True
						try:
												lowerCamelCase__ =series[1] / series[0]
												for index in range(len(__lowerCAmelCase    ) - 1    ):
																		if series[index + 1] / series[index] != common_ratio:
																								return False
						except ZeroDivisionError:
												return False
						return True





def       lowerCamelCase_			( __lowerCAmelCase    )							-> float:




						'''simple docstring'''



						if not isinstance(__lowerCAmelCase       ,   __lowerCAmelCase    ):
												raise ValueError("Input series is not valid, valid series - [2, 4, 8]"    )
						if len(__lowerCAmelCase    ) == 0:
												raise ValueError("Input list must be a non empty list"    )
						lowerCamelCase__ =1
						for value in series:
												answer *= value
						return pow(__lowerCAmelCase       ,   1 / len(__lowerCAmelCase    )    )


if __name__ == "__main__":
	import doctest

	doctest.testmod()


