




'''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	(      lowerCamelCase__						)					->       int:





       """simple docstring"""


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

def _lowercase	(      lowerCamelCase__							,    lowerCamelCase__						)					->       Dict:





       """simple docstring"""


       __UpperCAmelCase  :				Dict       				=		XGBClassifier()
       classifier.fit(__UpperCamelCase							,    __UpperCamelCase						)
       return classifier

def _lowercase	(      )					->       int:





       """simple docstring"""


       __UpperCAmelCase  :				Optional[Any]       				=		load_iris()
       __UpperCAmelCase  :				Optional[Any]       				=		data_handling(__UpperCamelCase						)
       __UpperCAmelCase  :				List[str]       				=		train_test_split(
           __UpperCamelCase							,    __UpperCamelCase							,    test_size=0.25						)

       __UpperCAmelCase  :				List[str]       				=		iris["""target_names"""]

       # Create an XGBoost Classifier from the training data
       __UpperCAmelCase  :				List[str]       				=		xgboost(__UpperCamelCase							,    __UpperCamelCase						)

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





       """simple docstring"""


       return not any(
           neighbour == 1 and colored_vertices[i] == color
           for i, neighbour in enumerate(lowerCamelCase__						)						)

def _lowercase	(      lowerCamelCase__							,    lowerCamelCase__							,    lowerCamelCase__							,    lowerCamelCase__						)					->       bool:





       """simple docstring"""


       if index == len(lowerCamelCase__						):
              return True

       # Recursive Step
       for i in range(lowerCamelCase__						):
              if valid_coloring(graph[index]							,    lowerCamelCase__							,    lowerCamelCase__						):
                     # Color current vertex
                     __UpperCAmelCase  :				List[str]       				=		i
                     # Validate coloring
                     if util_color(lowerCamelCase__							,    lowerCamelCase__							,    lowerCamelCase__							,    index + 1						):
                            return True
                     # Backtrack
                     __UpperCAmelCase  :				Any       				=		-1
       return False


def _lowercase	(      lowerCamelCase__							,    lowerCamelCase__						)					->       list[int]:





       """simple docstring"""


       __UpperCAmelCase  :				Optional[Any]       				=		[-1] * len(lowerCamelCase__						)

       if util_color(lowerCamelCase__							,    lowerCamelCase__							,    lowerCamelCase__							,    0						):
              return colored_vertices

       return []






