

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					(	__A :					dict		)				->			tuple:





    '''simple docstring'''




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







def       lowercase					(	__A :					np.ndarray ,    __A :					np.ndarray		)				->			XGBClassifier:





    '''simple docstring'''




    snake_case							:		List[str]        =		XGBClassifier()
    classifier.fit(__A ,    __A		)
    return classifier







def       lowercase					(	)				->			None:





    '''simple docstring'''




    snake_case							:		Any        =		load_iris()
    snake_case      ,		snake_case							:		str        =		data_handling(__A		)
    snake_case      ,		snake_case      ,		snake_case      ,		snake_case							:		Optional[int]        =		train_test_split(
        __A ,    __A ,    test_size=0.25		)

    snake_case							:		Union[str, Any]        =		iris["""target_names"""]

    # Create an XGBoost Classifier from the training data
    snake_case							:		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'''

def        UpperCAmelCase_ (  lowerCamelCase_      ,			lowerCamelCase_      ,			lowerCamelCase_      ,			lowerCamelCase_			):







 """simple docstring"""


 if height >= 1:
  move_tower(height - 1      ,			lowerCamelCase_      ,			lowerCamelCase_      ,			lowerCamelCase_			)
  move_disk(lowerCamelCase_      ,			lowerCamelCase_			)
  move_tower(height - 1      ,			lowerCamelCase_      ,			lowerCamelCase_      ,			lowerCamelCase_			)


def        UpperCAmelCase_ (  lowerCamelCase_      ,			lowerCamelCase_			):







 """simple docstring"""


 print("moving disk from"      ,			lowerCamelCase_      ,			"to"      ,			lowerCamelCase_			)


def        UpperCAmelCase_ (  ):







 """simple docstring"""


 lowerCAmelCase__     :   List[str]     		=	int(input("Height of hanoi: "			).strip()			)
 move_tower(lowerCamelCase_      ,			"A"      ,			"B"      ,			"C"			)


if __name__ == "__main__":
     main()





