





class  __lowerCAmelCase	:






			def __init__(self   )					->       List[str]:


							'''simple docstring'''



							snake_case_						:   Tuple           =  {}






			def       lowerCamelCase  (self   )					->       None:


							'''simple docstring'''



							print(self.vertex   )
							for i in self.vertex:
											print(__magic_name__ ,							''' -> ''' ,							''' -> '''.join([str(__magic_name__   ) for j in self.vertex[i]]   )   )






			def       lowerCamelCase  (self ,							__magic_name__ ,							__magic_name__   )					->       None:


							'''simple docstring'''



							if from_vertex in self.vertex:
											self.vertex[from_vertex].append(__magic_name__   )
							else:
											# else make a new vertex
											snake_case_						:   Any           =  [to_vertex]






			def       lowerCamelCase  (self   )					->       None:


							'''simple docstring'''



							snake_case_						:   List[Any]           =  [False] * len(self.vertex   )

							# call the recursive helper function
							for i in range(len(self.vertex   )   ):
											if not visited[i]:
															self.dfs_recursive(__magic_name__ ,							__magic_name__   )






			def       lowerCamelCase  (self ,							__magic_name__ ,							__magic_name__   )					->       None:


							'''simple docstring'''



							snake_case_						:   Union[str, Any]           =  True

							print(__magic_name__ ,							end=''' '''   )

							# Recur for all the vertices that are adjacent to this node
							for i in self.vertex:
											if not visited[i]:
															self.dfs_recursive(__magic_name__ ,							__magic_name__   )


if __name__ == "__main__":
	lowerCAmelCase_    =    Graph()
	g.add_edge(0, 1)
	g.add_edge(0, 2)
	g.add_edge(1, 2)
	g.add_edge(2, 0)
	g.add_edge(2, 3)
	g.add_edge(3, 3)

	g.print_graph()
	print('''DFS:''')
	g.dfs()

	# OUTPUT:
	# 0  ->  1 -> 2
	# 1  ->  2
	# 2  ->  0 -> 3
	# 3  ->  3
	# DFS:
	#  0 1 2 3







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()
