

"""simple docstring"""







from __future__ import annotations




def      UpperCAmelCase__ (lowerCAmelCase_						,		lowerCAmelCase_						,		lowerCAmelCase_						,		):




					'''simple docstring'''


					if (stress, tangential_force, area).count(0     ) != 1:
										raise ValueError("You cannot supply more or less than 2 values"     )
					elif stress < 0:
										raise ValueError("Stress cannot be negative"     )
					elif tangential_force < 0:
										raise ValueError("Tangential Force cannot be negative"     )
					elif area < 0:
										raise ValueError("Area cannot be negative"     )
					elif stress == 0:
										return (
										    "stress",
										    tangential_force / area,
										)
					elif tangential_force == 0:
										return (
										    "tangential_force",
										    stress * area,
										)
					else:
										return (
										    "area",
										    tangential_force / stress,
										)


if __name__ == "__main__":
		import doctest

		doctest.testmod()




"""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      UpperCAmelCase__ (lowerCAmelCase_     ):




					'''simple docstring'''


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




def      UpperCAmelCase__ (lowerCAmelCase_						,		lowerCAmelCase_     ):




					'''simple docstring'''


					__SCREAMING_SNAKE_CASE		     =       XGBClassifier()
					classifier.fit(lowerCAmelCase_						,		lowerCAmelCase_     )
					return classifier




def      UpperCAmelCase__ ():




					'''simple docstring'''


					__SCREAMING_SNAKE_CASE		     =       load_iris()
					__SCREAMING_SNAKE_CASE     ,						__SCREAMING_SNAKE_CASE		     =       data_handling(lowerCAmelCase_     )
					__SCREAMING_SNAKE_CASE     ,						__SCREAMING_SNAKE_CASE     ,						__SCREAMING_SNAKE_CASE     ,						__SCREAMING_SNAKE_CASE		     =       train_test_split(
					    lowerCAmelCase_						,		lowerCAmelCase_						,		test_size=0.25     )

					__SCREAMING_SNAKE_CASE		     =       iris["target_names"]

					# Create an XGBoost Classifier from the training data
					__SCREAMING_SNAKE_CASE		     =       xgboost(lowerCAmelCase_						,		lowerCAmelCase_     )

					# Display the confusion matrix of the classifier with both training and test sets
					ConfusionMatrixDisplay.from_estimator(
					    lowerCAmelCase_						,		lowerCAmelCase_						,		lowerCAmelCase_						,		display_labels=lowerCAmelCase_						,		cmap="Blues"						,		normalize="true"						,		)
					plt.title("Normalized Confusion Matrix - IRIS Dataset"     )
					plt.show()


if __name__ == "__main__":
		import doctest

		doctest.testmod(verbose=True)
		main()
