

'''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 		_A     (    A__      ):






 """simple docstring"""



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


def 		_A     (    A__     ,				A__      ):






 """simple docstring"""



 __lowercase							  = XGBClassifier()
 classifier.fit(A__     ,				A__      )
 return classifier


def 		_A     (    ):






 """simple docstring"""



 __lowercase							  = load_iris()
 __lowercase  ,	__lowercase							  = data_handling(A__      )
 __lowercase  ,	__lowercase  ,	__lowercase  ,	__lowercase							  = train_test_split(
     A__     ,				A__     ,				test_size=0.2_5      )

 __lowercase							  = iris['''target_names''']

 # Create an XGBoost Classifier from the training data
 __lowercase							  = xgboost(A__     ,				A__      )

 # Display the confusion matrix of the classifier with both training and test sets
 ConfusionMatrixDisplay.from_estimator(
     A__     ,				A__     ,				A__     ,				display_labels=A__     ,				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:   List[str]								=		{
    "configuration_clipseg": [
        "CLIPSEG_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "CLIPSegConfig",
        "CLIPSegTextConfig",
        "CLIPSegVisionConfig",
    ],
    "processing_clipseg": ["CLIPSegProcessor"],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      A:   Optional[int]								=		[
          "CLIPSEG_PRETRAINED_MODEL_ARCHIVE_LIST",
          "CLIPSegModel",
          "CLIPSegPreTrainedModel",
          "CLIPSegTextModel",
          "CLIPSegVisionModel",
          "CLIPSegForImageSegmentation",
      ]

if TYPE_CHECKING:
      from .configuration_clipseg import (
          CLIPSEG_PRETRAINED_CONFIG_ARCHIVE_MAP,
          CLIPSegConfig,
          CLIPSegTextConfig,
          CLIPSegVisionConfig,
      )
      from .processing_clipseg import CLIPSegProcessor

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_clipseg import (
                CLIPSEG_PRETRAINED_MODEL_ARCHIVE_LIST,
                CLIPSegForImageSegmentation,
                CLIPSegModel,
                CLIPSegPreTrainedModel,
                CLIPSegTextModel,
                CLIPSegVisionModel,
            )

else:
      import sys

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