



"""simple docstring"""
import numpy as np
from matplotlib import pyplot as plt
from sklearn.datasets import load_iris
from sklearn.metrics import ConfusionMatrixDisplay
from sklearn.model_selection import train_test_split
from xgboost import XGBClassifier


def       _SCREAMING_SNAKE_CASE    (__lowerCAmelCase				)			->    Tuple:







  '''simple docstring'''


  return (data["data"], data["target"])


def       _SCREAMING_SNAKE_CASE    (__lowerCAmelCase			,	__lowerCAmelCase				)			->    str:







  '''simple docstring'''


  lowercase_             =			XGBClassifier()
  classifier.fit(_UpperCamelCase			,	_UpperCamelCase				)
  return classifier


def       _SCREAMING_SNAKE_CASE    ()			->    Optional[int]:







  '''simple docstring'''


  lowercase_             =			load_iris()
  lowercase_       ,     lowercase_             =			data_handling(_UpperCamelCase				)
  lowercase_       ,     lowercase_       ,     lowercase_       ,     lowercase_             =			train_test_split(
      _UpperCamelCase			,	_UpperCamelCase			,	test_size=0.25				)

  lowercase_             =			iris["""target_names"""]

  # Create an XGBoost Classifier from the training data
  lowercase_             =			xgboost(_UpperCamelCase			,	_UpperCamelCase				)

  # Display the confusion matrix of the classifier with both training and test sets
  ConfusionMatrixDisplay.from_estimator(
      _UpperCamelCase			,	_UpperCamelCase			,	_UpperCamelCase			,	display_labels=_UpperCamelCase			,	cmap="""Blues"""			,	normalize="""true"""			,	)
  plt.title("""Normalized Confusion Matrix - IRIS Dataset"""				)
  plt.show()


if __name__ == "__main__":
       import doctest

       doctest.testmod(verbose=True)
       main()





"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


A	:  Union[str, Any]            =     {
    "configuration_timesformer": ["TIMESFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP", "TimesformerConfig"],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	A	:  Optional[int]            =     [
	    "TIMESFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
	    "TimesformerModel",
	    "TimesformerForVideoClassification",
	    "TimesformerPreTrainedModel",
	]

if TYPE_CHECKING:
	from .configuration_timesformer import TIMESFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, TimesformerConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_timesformer import (
		    TIMESFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
		    TimesformerForVideoClassification,
		    TimesformerModel,
		    TimesformerPreTrainedModel,
		)

else:
	import sys

	A	:  List[str]            =     _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)




