
"""simple docstring"""


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

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

# KNN

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

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

lowerCAmelCase								=						knn.predict(X_new)

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

"""simple docstring"""


from math import cos, sin






def        lowerCAmelCase_       (		snake_case_		:      float      )       ->list[list[float]]:
			lowerCamelCase__     :					List[Any]		=float(snake_case_      )
			return [[scaling_factor * int(x == y      ) for x in range(2      )] for y in range(2      )]






def        lowerCAmelCase_       (		snake_case_		:      float      )       ->list[list[float]]:
			lowerCamelCase__	,    lowerCamelCase__     :					Union[str, Any]		=cos(snake_case_      ), sin(snake_case_      )
			return [[c, -s], [s, c]]






def        lowerCAmelCase_       (		snake_case_		:      float      )       ->list[list[float]]:
			lowerCamelCase__	,    lowerCamelCase__     :					Optional[Any]		=cos(snake_case_      ), sin(snake_case_      )
			lowerCamelCase__     :					Dict		=c * s
			return [[c * c, cs], [cs, s * s]]






def        lowerCAmelCase_       (		snake_case_		:      float      )       ->list[list[float]]:
			lowerCamelCase__	,    lowerCamelCase__     :					str		=cos(snake_case_      ), sin(snake_case_      )
			lowerCamelCase__     :					Dict		=c * s
			return [[2 * c - 1, 2 * cs], [2 * cs, 2 * s - 1]]


print(f"""    {scaling(5) = }""")
print(f"""  {rotation(45) = }""")
print(f"""{projection(45) = }""")

print(f"""{reflection(45) = }""")