


"""simple docstring"""







class 				UpperCamelCase_			:

	"""simple docstring"""





	def __init__(				self    :       List[Any]    ,    UpperCAmelCase__    :       int     ) ->			Dict:
						__SCREAMING_SNAKE_CASE		     =       n
						__SCREAMING_SNAKE_CASE		     =       [None] * self.n
						__SCREAMING_SNAKE_CASE		     =       0  # index of the first element
						__SCREAMING_SNAKE_CASE		     =       0
						__SCREAMING_SNAKE_CASE		     =       0




	def __len__(				self    :       Tuple     ) ->			int:
						return self.size




	def 						UpperCAmelCase_   (				self    :       List[str]     ) ->			bool:
						return self.size == 0




	def 						UpperCAmelCase_   (				self    :       Tuple     ) ->			Tuple:
						return False if self.is_empty() else self.array[self.front]




	def 						UpperCAmelCase_   (				self    :       Optional[Any]    ,    UpperCAmelCase__    :       Tuple     ) ->			Union[str, Any]:
						if self.size >= self.n:
											raise Exception("QUEUE IS FULL"     )

						__SCREAMING_SNAKE_CASE		     =       data
						__SCREAMING_SNAKE_CASE		     =       (self.rear + 1) % self.n
						self.size += 1
						return self




	def 						UpperCAmelCase_   (				self    :       str     ) ->			Tuple:
						if self.size == 0:
											raise Exception("UNDERFLOW"     )

						__SCREAMING_SNAKE_CASE		     =       self.array[self.front]
						__SCREAMING_SNAKE_CASE		     =       None
						__SCREAMING_SNAKE_CASE		     =       (self.front + 1) % self.n
						self.size -= 1
						return temp




"""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()
