

"""simple docstring"""







import platform
from argparse import ArgumentParser

import huggingface_hub
import pandas
import pyarrow

from datasets import __version__ as version
from datasets.commands import BaseDatasetsCLICommand


def   a__      (		UpperCAmelCase__       :			str			)->	Union[str, Any]:
						return EnvironmentCommand()







class 			_lowercase		(   __lowerCamelCase  ):

				@staticmethod
				def        A (     _lowercase       :    ArgumentParser     ):


										'''simple docstring'''
										UpperCAmelCase__						=		parser.add_parser("""env"""       ,    help="""Print relevant system environment info."""     )
										download_parser.set_defaults(func=_lowercase     )

				def        A (     self       :    str     ):


										'''simple docstring'''
										UpperCAmelCase__						=		{
										    """`datasets` version""": version,
										    """Platform""": platform.platform(),
										    """Python version""": platform.python_version(),
										    """Huggingface_hub version""": huggingface_hub.__version__,
										    """PyArrow version""": pyarrow.__version__,
										    """Pandas version""": pandas.__version__,
										}

										print("""\nCopy-and-paste the text below in your GitHub issue.\n"""     )
										print(self.format_dict(_lowercase     )     )

										return info

				@staticmethod
				def        A (     _lowercase       :    Union[str, Any]     ):


										'''simple docstring'''
										return "\n".join([f'- {prop}: {val}' for prop, val in d.items()]     ) + "\n"


"""simple docstring"""







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

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

# KNN

UpperCamelCase_       :       str							   =		KNeighborsClassifier(n_neighbors=1)
knn.fit(X_train, y_train)

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

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

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

