


import os

from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE, hf_cache_home


snake_case    :   Any	    =					HUGGINGFACE_HUB_CACHE


snake_case    :   Tuple	    =					'''config.json'''
snake_case    :   int	    =					'''diffusion_pytorch_model.bin'''
snake_case    :   Union[str, Any]	    =					'''diffusion_flax_model.msgpack'''
snake_case    :   Tuple	    =					'''model.onnx'''
snake_case    :   Any	    =					'''diffusion_pytorch_model.safetensors'''
snake_case    :   Optional[Any]	    =					'''weights.pb'''
snake_case    :   Optional[int]	    =					'''https://huggingface.co'''
snake_case    :   List[Any]	    =					default_cache_path
snake_case    :   Union[str, Any]	    =					'''diffusers_modules'''
snake_case    :   Union[str, Any]	    =					os.getenv('''HF_MODULES_CACHE''', os.path.join(hf_cache_home, '''modules'''))
snake_case    :   int	    =					['''fp16''', '''non-ema''']
snake_case    :   Any	    =					'''.self_attn'''









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     __lowerCamelCase						(			UpperCAmelCase_						:		dict						):




      """simple docstring"""





      return (data["data"], data["target"])
def     __lowerCamelCase						(			UpperCAmelCase_						:		np.ndarray			,  UpperCAmelCase_						:		np.ndarray						):




      """simple docstring"""





      a						:Optional[Any]										=	XGBClassifier()
      classifier.fit(UpperCAmelCase_			,  UpperCAmelCase_						)
      return classifier
def     __lowerCamelCase						(			):




      """simple docstring"""





      a						:List[Any]										=	load_iris()
      a							,    a						:Any										=	data_handling(UpperCAmelCase_						)
      a							,    a							,    a							,    a						:Tuple										=	train_test_split(
          UpperCAmelCase_			,  UpperCAmelCase_			,  test_size=0.25						)

      a						:List[Any]										=	iris['''target_names''']

      # Create an XGBoost Classifier from the training data
      a						:Optional[int]										=	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()





