





class  __lowerCAmelCase	:






			def __init__(self ,							__magic_name__ ,							__magic_name__ ,							__magic_name__   )					->       Optional[int]:


							'''simple docstring'''



							snake_case_						:   Optional[Any]           =  name
							snake_case_						:   str           =  value
							snake_case_						:   Tuple           =  weight






			def __repr__(self   )					->       Tuple:


							'''simple docstring'''



							return F'''{self.__class__.__name__}({self.name}, {self.value}, {self.weight})'''






			def       lowerCamelCase  (self   )					->       Any:


							'''simple docstring'''



							return self.value






			def       lowerCamelCase  (self   )					->       Dict:


							'''simple docstring'''



							return self.name






			def       lowerCamelCase  (self   )					->       Dict:


							'''simple docstring'''



							return self.weight






			def       lowerCamelCase  (self   )					->       Any:


							'''simple docstring'''



							return self.value / self.weight






def 					lowerCamelCase_						(    _UpperCamelCase			,    _UpperCamelCase			,    _UpperCamelCase			)		->						Tuple:






				"""simple docstring"""


				snake_case_						:   Optional[int]           =  []
				for i in range(len(_UpperCamelCase			)			):
								menu.append(Things(name[i]			,    value[i]			,    weight[i]			)			)
				return menu






def 					lowerCamelCase_						(    _UpperCamelCase			,    _UpperCamelCase			,    _UpperCamelCase			)		->						Optional[int]:






				"""simple docstring"""


				snake_case_						:   Union[str, Any]           =  sorted(_UpperCamelCase			,    key=_UpperCamelCase			,    reverse=_UpperCamelCase			)
				snake_case_						:   Optional[int]           =  []
				snake_case_						:   Optional[int]           =  0.0, 0.0
				for i in range(len(_UpperCamelCase			)			):
								if (total_cost + items_copy[i].get_weight()) <= max_cost:
												result.append(items_copy[i]			)
												total_cost += items_copy[i].get_weight()
												total_value += items_copy[i].get_value()
				return (result, total_value)






def 					lowerCamelCase_						(    )		->						Union[str, Any]:






				"""simple docstring"""






if __name__ == "__main__":
	import doctest

	doctest.testmod()







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 					lowerCamelCase_						(    _UpperCamelCase			)		->						tuple:






				"""simple docstring"""


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






def 					lowerCamelCase_						(    _UpperCamelCase			,    _UpperCamelCase			)		->						XGBClassifier:






				"""simple docstring"""


				snake_case_						:   Optional[Any]           =  XGBClassifier()
				classifier.fit(_UpperCamelCase			,    _UpperCamelCase			)
				return classifier






def 					lowerCamelCase_						(    )		->						None:






				"""simple docstring"""


				snake_case_						:   Optional[Any]           =  load_iris()
				snake_case_      ,							snake_case_						:   str           =  data_handling(_UpperCamelCase			)
				snake_case_      ,							snake_case_      ,							snake_case_      ,							snake_case_						:   Dict           =  train_test_split(
				    _UpperCamelCase			,    _UpperCamelCase			,    test_size=0.25			)

				snake_case_						:   List[str]           =  iris['''target_names''']

				# Create an XGBoost Classifier from the training data
				snake_case_						:   int           =  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()
