






'''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  (_lowercase     )   ->     tuple:


					"""simple docstring"""
					return (data["data"], data["target"])
def     __lowercase  (_lowercase,						_lowercase     )   ->     XGBClassifier:


					"""simple docstring"""
					__lowerCamelCase						:       Any				   =				XGBClassifier()
					classifier.fit(_lowercase,						_lowercase     )
					return classifier
def     __lowercase  ()   ->     None:


					"""simple docstring"""
					__lowerCamelCase						:       Tuple				   =				load_iris()
					__lowerCamelCase						:       Union[str, Any]				   =				data_handling(_lowercase     )
					__lowerCamelCase						:       Union[str, Any]				   =				train_test_split(
					    _lowercase,						_lowercase,						test_size=0.25     )

					__lowerCamelCase						:       List[Any]				   =				iris["""target_names"""]

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

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

from __future__ import annotations

from typing import Any
def     __lowercase  (_lowercase     )   ->     int:


     """simple docstring"""
     if not postfix_notation:
          return 0

     __lowerCamelCase						:       Optional[int]				   =				{"""+""", """-""", """*""", """/"""}
     __lowerCamelCase						:       list[Any]				   =				[]

     for token in postfix_notation:
          if token in operations:
               __lowerCamelCase   ,      __lowerCamelCase						:       List[Any]				   =				stack.pop(), stack.pop()
               if token == "+":
                    stack.append(a + b     )
               elif token == "-":
                    stack.append(a - b     )
               elif token == "*":
                    stack.append(a * b     )
               else:
                    if a * b < 0 and a % b != 0:
                         stack.append(a // b + 1     )
                    else:
                         stack.append(a // b     )
          else:
               stack.append(int(_lowercase     )     )

     return stack.pop()


if __name__ == "__main__":
   import doctest

   doctest.testmod()



