

'''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  _UpperCamelCase (     _a	:	dict			):




    """simple docstring"""



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







def  _UpperCamelCase (     _a	:	np.ndarray				,     _a	:	np.ndarray			):




    """simple docstring"""



    __UpperCamelCase	:	List[str]		    =  XGBClassifier()
    classifier.fit(_a				,     _a			)
    return classifier







def  _UpperCamelCase (     ):




    """simple docstring"""



    __UpperCamelCase	:	Any		    =  load_iris()
    __UpperCamelCase	:	int		    =  data_handling(_a			)
    __UpperCamelCase	:	List[str]		    =  train_test_split(
        _a				,     _a				,     test_size=0.25			)

    __UpperCamelCase	:	Optional[int]		    =  iris['target_names']

    # Create an XGBoost Classifier from the training data
    __UpperCamelCase	:	Any		    =  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_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
)


a=  {}

try:
  if not is_sentencepiece_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  a=  ['''NllbTokenizer''']

try:
  if not is_tokenizers_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  a=  ['''NllbTokenizerFast''']


if TYPE_CHECKING:
  try:
    if not is_sentencepiece_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_nllb import NllbTokenizer

  try:
    if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_nllb_fast import NllbTokenizerFast

else:
  import sys

  a=  _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)



