


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__					(  SCREAMING_SNAKE_CASE__						):
 return (data["data"], data["target"])
def 				UpperCamelCase__					(  SCREAMING_SNAKE_CASE__      ,	SCREAMING_SNAKE_CASE__						):
 __lowerCamelCase		:							Union[str, Any]		 =						XGBClassifier()
 classifier.fit(SCREAMING_SNAKE_CASE__      ,	SCREAMING_SNAKE_CASE__						)
 return classifier
def 				UpperCamelCase__					(  ):
 __lowerCamelCase		:							Tuple		 =						load_iris()
 __lowerCamelCase ,					__lowerCamelCase		:							List[str]		 =						data_handling(SCREAMING_SNAKE_CASE__						)
 __lowerCamelCase ,					__lowerCamelCase ,					__lowerCamelCase ,					__lowerCamelCase		:							Tuple		 =						train_test_split(
     SCREAMING_SNAKE_CASE__      ,	SCREAMING_SNAKE_CASE__      ,	test_size=0.25						)

 __lowerCamelCase		:							Union[str, Any]		 =						iris['target_names']

 # Create an XGBoost Classifier from the training data
 __lowerCamelCase		:							str		 =						xgboost(SCREAMING_SNAKE_CASE__      ,	SCREAMING_SNAKE_CASE__						)

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





from __future__ import annotations
def 				UpperCamelCase__					(  SCREAMING_SNAKE_CASE__						):
 __lowerCamelCase		:							List[Any]		 =						str(SCREAMING_SNAKE_CASE__						)
 return len(SCREAMING_SNAKE_CASE__						) == 9 and set(SCREAMING_SNAKE_CASE__						) == set('123456789'						)
def 				UpperCamelCase__					(  ):
 for base_num in range(9_999      ,	4_999      ,	-1						):
  __lowerCamelCase		:							Tuple		 =						100_002 * base_num
  if is_9_pandigital(SCREAMING_SNAKE_CASE__						):
   return candidate

 for base_num in range(333      ,	99      ,	-1						):
  __lowerCamelCase		:							Union[str, Any]		 =						1_002_003 * base_num
  if is_9_pandigital(SCREAMING_SNAKE_CASE__						):
   return candidate

 return None


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

