




"""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        a__					(							snake_case__							)		->   tuple:
			return (data["data"], data["target"])



def        a__					(							snake_case__			,					snake_case__							)		->   XGBClassifier:
			lowerCamelCase      =   XGBClassifier()
			classifier.fit(snake_case__			,					snake_case__							)
			return classifier



def        a__					(							)		->   None:
			lowerCamelCase      =   load_iris()
			lowerCamelCase ,  lowerCamelCase      =   data_handling(snake_case__							)
			lowerCamelCase ,  lowerCamelCase ,  lowerCamelCase ,  lowerCamelCase      =   train_test_split(
			    snake_case__			,					snake_case__			,					test_size=0.25							)

			lowerCamelCase      =   iris["""target_names"""]

			# Create an XGBoost Classifier from the training data
			lowerCamelCase      =   xgboost(snake_case__			,					snake_case__							)

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




def        a__					(							snake_case__							)		->   list:

			if len(snake_case__							) <= 1:
						return [tuple(snake_case__							)]

			lowerCamelCase      =   []

			def generate(snake_case__			,					snake_case__							):
						lowerCamelCase      =   [0] * n
						res.append(tuple(snake_case__							)							)

						lowerCamelCase      =   0
						while i < n:
									if c[i] < i:
												if i % 2 == 0:
															lowerCamelCase ,  lowerCamelCase      =   arr[i], arr[0]
												else:
															lowerCamelCase ,  lowerCamelCase      =   arr[i], arr[c[i]]
												res.append(tuple(snake_case__							)							)
												c[i] += 1
												lowerCamelCase      =   0
									else:
												lowerCamelCase      =   0
												i += 1

			generate(len(snake_case__							)			,					snake_case__							)
			return res


if __name__ == "__main__":
					lowerCAmelCase				:     str					=				input("""Enter numbers separated by a comma:\n""").strip()
					lowerCAmelCase				:     List[Any]					=				[int(item) for item in user_input.split(""",""")]
					print(heaps(arr))



