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

def lowercase_  (   _snake_case   ,_snake_case						):
							SCREAMING_SNAKE_CASE__						:       int           =   XGBClassifier()
							classifier.fit(_snake_case   ,_snake_case						)
							return classifier

def lowercase_  (   ):
							SCREAMING_SNAKE_CASE__						:       Dict           =   load_iris()
							SCREAMING_SNAKE_CASE__      ,      SCREAMING_SNAKE_CASE__						:       Dict           =   data_handling(_snake_case						)
							SCREAMING_SNAKE_CASE__      ,      SCREAMING_SNAKE_CASE__      ,      SCREAMING_SNAKE_CASE__      ,      SCREAMING_SNAKE_CASE__						:       str           =   train_test_split(
							    _snake_case   ,_snake_case   ,test_size=0.25						)

							SCREAMING_SNAKE_CASE__						:       int           =   iris["""target_names"""]

							# Create an XGBoost Classifier from the training data
							SCREAMING_SNAKE_CASE__						:       Optional[int]           =   xgboost(_snake_case   ,_snake_case						)

							# Display the confusion matrix of the classifier with both training and test sets
							ConfusionMatrixDisplay.from_estimator(
							    _snake_case   ,_snake_case   ,_snake_case   ,display_labels=_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"""




def lowercase_  (   _snake_case   ,_snake_case						):
							return 1 if input_a == input_a else 0

def lowercase_  (   ):
							assert xnor_gate(0   ,0						) == 1
							assert xnor_gate(0   ,1						) == 0
							assert xnor_gate(1   ,0						) == 0
							assert xnor_gate(1   ,1						) == 1


if __name__ == "__main__":
					print(xnor_gate(0, 0))
					print(xnor_gate(0, 1))
					print(xnor_gate(1, 0))
					print(xnor_gate(1, 1))




