




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_(     snake_case							:	Tuple					):

							'''simple docstring'''






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


def 					UpperCamelCase_(     snake_case							:	Tuple							,    snake_case							:	str					):

							'''simple docstring'''






							snake_case_      =				XGBClassifier()
							classifier.fit(lowercase_							,    lowercase_					)
							return classifier


def 					UpperCamelCase_(     ):

							'''simple docstring'''






							snake_case_      =				load_iris()
							snake_case_ ,				snake_case_      =				data_handling(lowercase_					)
							snake_case_ ,				snake_case_ ,				snake_case_ ,				snake_case_      =				train_test_split(
							    lowercase_							,    lowercase_							,    test_size=0.25					)

							snake_case_      =				iris["target_names"]

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





_SCREAMING_SNAKE_CASE							:       Optional[int]						=			"Alexander Joslin"

import operator as op

from .stack import Stack


def 					UpperCamelCase_(     snake_case							:	str					):

							'''simple docstring'''






							snake_case_      =				{"*": op.mul, "/": op.truediv, "+": op.add, "-": op.sub}

							snake_case_      =				Stack()
							snake_case_      =				Stack()

							for i in equation:
														if i.isdigit():
																					# RULE 1
																					operand_stack.push(int(snake_case					)					)
														elif i in operators:
																					# RULE 2
																					operator_stack.push(snake_case					)
														elif i == ")":
																					# RULE 4
																					snake_case_      =				operator_stack.peek()
																					operator_stack.pop()
																					snake_case_      =				operand_stack.peek()
																					operand_stack.pop()
																					snake_case_      =				operand_stack.peek()
																					operand_stack.pop()

																					snake_case_      =				operators[opr](snake_case							,    snake_case					)
																					operand_stack.push(snake_case					)

    # RULE 5
							return operand_stack.peek()


if __name__ == "__main__":
		_SCREAMING_SNAKE_CASE							:       List[Any]						=			"(5 + ((4 * 2) * (2 + 3)))"
		# answer = 45
		print(F"{equation} = {dijkstras_two_stack_algorithm(equation)}")




