





"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


A_     :      Optional[int]								={
    """configuration_videomae""": ["""VIDEOMAE_PRETRAINED_CONFIG_ARCHIVE_MAP""", """VideoMAEConfig"""],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      A_     :      List[str]								=[
          """VIDEOMAE_PRETRAINED_MODEL_ARCHIVE_LIST""",
          """VideoMAEForPreTraining""",
          """VideoMAEModel""",
          """VideoMAEPreTrainedModel""",
          """VideoMAEForVideoClassification""",
      ]

try:
      if not is_vision_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      A_     :      Tuple								=["""VideoMAEFeatureExtractor"""]
      A_     :      Optional[int]								=["""VideoMAEImageProcessor"""]

if TYPE_CHECKING:
      from .configuration_videomae import VIDEOMAE_PRETRAINED_CONFIG_ARCHIVE_MAP, VideoMAEConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_videomae import (
                VIDEOMAE_PRETRAINED_MODEL_ARCHIVE_LIST,
                VideoMAEForPreTraining,
                VideoMAEForVideoClassification,
                VideoMAEModel,
                VideoMAEPreTrainedModel,
            )

      try:
            if not is_vision_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .feature_extraction_videomae import VideoMAEFeatureExtractor
            from .image_processing_videomae import VideoMAEImageProcessor

else:
      import sys

      A_     :      Optional[Any]								=_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)













"""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_     :      List[str]								=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_     :      List[Any]								=train_test_split(
    iris["""data"""], iris["""target"""], random_state=4
)

# KNN

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

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

A_     :      int								=knn.predict(X_new)

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






