

"""simple docstring"""







from abc import ABC, abstractmethod
from argparse import ArgumentParser




class 				UpperCamelCase_			(				UpperCamelCase):

	"""simple docstring"""





	@staticmethod
	@abstractmethod
	def 						UpperCAmelCase_   (				UpperCAmelCase__    :       ArgumentParser     ) ->			Optional[Any]:
						raise NotImplementedError()




	@abstractmethod
	def 						UpperCAmelCase_   (				self    :       Optional[Any]     ) ->			List[str]:
						raise NotImplementedError()




"""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__ (lowerCAmelCase_     ):




					'''simple docstring'''


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




def      UpperCAmelCase__ (lowerCAmelCase_						,		lowerCAmelCase_     ):




					'''simple docstring'''


					__SCREAMING_SNAKE_CASE		     =       XGBClassifier()
					classifier.fit(lowerCAmelCase_						,		lowerCAmelCase_     )
					return classifier




def      UpperCAmelCase__ ():




					'''simple docstring'''


					__SCREAMING_SNAKE_CASE		     =       load_iris()
					__SCREAMING_SNAKE_CASE     ,						__SCREAMING_SNAKE_CASE		     =       data_handling(lowerCAmelCase_     )
					__SCREAMING_SNAKE_CASE     ,						__SCREAMING_SNAKE_CASE     ,						__SCREAMING_SNAKE_CASE     ,						__SCREAMING_SNAKE_CASE		     =       train_test_split(
					    lowerCAmelCase_						,		lowerCAmelCase_						,		test_size=0.25     )

					__SCREAMING_SNAKE_CASE		     =       iris["target_names"]

					# Create an XGBoost Classifier from the training data
					__SCREAMING_SNAKE_CASE		     =       xgboost(lowerCAmelCase_						,		lowerCAmelCase_     )

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


if __name__ == "__main__":
		import doctest

		doctest.testmod(verbose=True)
		main()
