




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





def 						UpperCAmelCase				(			A__:    np.ndarray							,				A__:    np.ndarray     )  ->     XGBClassifier:
			__lowerCamelCase					:	Tuple	       =				XGBClassifier()
			classifier.fit(A__							,				A__     )
			return classifier





def 						UpperCAmelCase				(			)  ->     None:
			__lowerCamelCase					:	Optional[Any]	       =				load_iris()
			__lowerCamelCase					:	str	       =				data_handling(A__     )
			__lowerCamelCase					:	Any	       =				train_test_split(
			    A__							,				A__							,				test_size=0.25     )

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

			# Create an XGBoost Classifier from the training data
			__lowerCamelCase					:	int	       =				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"""
import math





def 						UpperCAmelCase				(			A__:    int = 100     )  ->     int:
			__lowerCamelCase					:	Optional[Any]	       =				sum(i * i for i in range(1							,				n + 1     )     )
			__lowerCamelCase					:	Union[str, Any]	       =				int(math.pow(sum(range(1							,				n + 1     )     )							,				2     )     )
			return square_of_sum - sum_of_squares


if __name__ == "__main__":
					print(F"""{solution() = }""")



