




'''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 			lowerCamelCase(							SCREAMING_SNAKE_CASE_     )		->		tuple:
			return (data["data"], data["target"])





def 			lowerCamelCase(							SCREAMING_SNAKE_CASE_       ,SCREAMING_SNAKE_CASE_     )		->		XGBClassifier:
			A_									= XGBClassifier()
			classifier.fit(SCREAMING_SNAKE_CASE_       ,SCREAMING_SNAKE_CASE_     )
			return classifier





def 			lowerCamelCase(							)		->		None:
			A_									= load_iris()
			A_		, A_									= data_handling(SCREAMING_SNAKE_CASE_     )
			A_		, A_		, A_		, A_									= train_test_split(
			    SCREAMING_SNAKE_CASE_       ,SCREAMING_SNAKE_CASE_       ,test_size=0.25     )

			A_									= iris['target_names']

			# Create an XGBoost Classifier from the training data
			A_									= xgboost(SCREAMING_SNAKE_CASE_       ,SCREAMING_SNAKE_CASE_     )

			# Display the confusion matrix of the classifier with both training and test sets
			ConfusionMatrixDisplay.from_estimator(
			    SCREAMING_SNAKE_CASE_       ,SCREAMING_SNAKE_CASE_       ,SCREAMING_SNAKE_CASE_       ,display_labels=SCREAMING_SNAKE_CASE_       ,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'''
import os
import sys

_SCREAMING_SNAKE_CASE			=						os.path.join(os.path.dirname(__file__), "src")
sys.path.append(SRC_DIR)


from transformers import (
    AutoConfig,
    AutoModel,
    AutoModelForCausalLM,
    AutoModelForMaskedLM,
    AutoModelForQuestionAnswering,
    AutoModelForSequenceClassification,
    AutoTokenizer,
    add_start_docstrings,
)


_SCREAMING_SNAKE_CASE			=						[
    "torch",
    "numpy",
    "tokenizers",
    "filelock",
    "requests",
    "tqdm",
    "regex",
    "sentencepiece",
    "sacremoses",
    "importlib_metadata",
    "huggingface_hub",
]





@add_start_docstrings(AutoConfig.__doc__     )
def 			lowerCamelCase(							*SCREAMING_SNAKE_CASE_       ,**SCREAMING_SNAKE_CASE_     )		->		int:
			return AutoConfig.from_pretrained(*SCREAMING_SNAKE_CASE_       ,**SCREAMING_SNAKE_CASE_     )





@add_start_docstrings(AutoTokenizer.__doc__     )
def 			lowerCamelCase(							*SCREAMING_SNAKE_CASE_       ,**SCREAMING_SNAKE_CASE_     )		->		List[str]:
			return AutoTokenizer.from_pretrained(*SCREAMING_SNAKE_CASE_       ,**SCREAMING_SNAKE_CASE_     )





@add_start_docstrings(AutoModel.__doc__     )
def 			lowerCamelCase(							*SCREAMING_SNAKE_CASE_       ,**SCREAMING_SNAKE_CASE_     )		->		Union[str, Any]:
			return AutoModel.from_pretrained(*SCREAMING_SNAKE_CASE_       ,**SCREAMING_SNAKE_CASE_     )





@add_start_docstrings(AutoModelForCausalLM.__doc__     )
def 			lowerCamelCase(							*SCREAMING_SNAKE_CASE_       ,**SCREAMING_SNAKE_CASE_     )		->		Optional[int]:
			return AutoModelForCausalLM.from_pretrained(*SCREAMING_SNAKE_CASE_       ,**SCREAMING_SNAKE_CASE_     )





@add_start_docstrings(AutoModelForMaskedLM.__doc__     )
def 			lowerCamelCase(							*SCREAMING_SNAKE_CASE_       ,**SCREAMING_SNAKE_CASE_     )		->		Dict:
			return AutoModelForMaskedLM.from_pretrained(*SCREAMING_SNAKE_CASE_       ,**SCREAMING_SNAKE_CASE_     )





@add_start_docstrings(AutoModelForSequenceClassification.__doc__     )
def 			lowerCamelCase(							*SCREAMING_SNAKE_CASE_       ,**SCREAMING_SNAKE_CASE_     )		->		Union[str, Any]:
			return AutoModelForSequenceClassification.from_pretrained(*SCREAMING_SNAKE_CASE_       ,**SCREAMING_SNAKE_CASE_     )






@add_start_docstrings(AutoModelForQuestionAnswering.__doc__     )
def 			lowerCamelCase(							*SCREAMING_SNAKE_CASE_       ,**SCREAMING_SNAKE_CASE_     )		->		str:
			return AutoModelForQuestionAnswering.from_pretrained(*SCREAMING_SNAKE_CASE_       ,**SCREAMING_SNAKE_CASE_     )




