



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




def 			snake_case		(		lowerCAmelCase_  ,						lowerCAmelCase_	)						->				XGBClassifier:
  _snake_case   	=      XGBClassifier()
  classifier.fit(lowerCAmelCase_  ,						lowerCAmelCase_	)
  return classifier




def 			snake_case		(		)						->				None:
  _snake_case   	=      load_iris()
  _snake_case	,     _snake_case   	=      data_handling(lowerCAmelCase_	)
  _snake_case	,     _snake_case	,     _snake_case	,     _snake_case   	=      train_test_split(
      lowerCAmelCase_  ,						lowerCAmelCase_  ,						test_size=0.25	)

  _snake_case   	=      iris['''target_names''']

  # Create an XGBoost Classifier from the training data
  _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()












'''simple docstring'''

import os
from math import logaa

def     __magic_name__							(				__UpperCAmelCase = "base_exp.txt"   )    ->       int:

   '''simple docstring'''







   __SCREAMING_SNAKE_CASE   				=							0
   __SCREAMING_SNAKE_CASE   				=							0
   for i, line in enumerate(open(os.path.join(os.path.dirname(__UpperCAmelCase   )				,						__UpperCAmelCase   )   )   ):
      __SCREAMING_SNAKE_CASE				,  __SCREAMING_SNAKE_CASE   				=							list(map(__UpperCAmelCase				,						line.split(""","""   )   )   )
      if x * logaa(__UpperCAmelCase   ) > largest:
         __SCREAMING_SNAKE_CASE   				=							x * logaa(__UpperCAmelCase   )
         __SCREAMING_SNAKE_CASE   				=							i + 1
   return result


if __name__ == "__main__":
    print(solution())





