


'''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 							__magic_name__(						lowerCamelCase):
      return (data["data"], data["target"])

def 							__magic_name__(						lowerCamelCase,				lowerCamelCase):
      __lowerCAmelCase							       =				XGBClassifier()
      classifier.fit(lowerCamelCase,				lowerCamelCase)
      return classifier

def 							__magic_name__(						):
      __lowerCAmelCase							       =				load_iris()
      __lowerCAmelCase       ,					__lowerCAmelCase							       =				data_handling(lowerCamelCase)
      __lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase							       =				train_test_split(
          lowerCamelCase,				lowerCamelCase,				test_size=0.25)

      __lowerCAmelCase							       =				iris['''target_names''']

      # Create an XGBoost Classifier from the training data
      __lowerCAmelCase							       =				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'''

from typing import TYPE_CHECKING

from ...file_utils import _LazyModule, is_torch_available
from ...utils import OptionalDependencyNotAvailable


_UpperCAmelCase				: str							    =				{
    """configuration_gpt_neox_japanese""": ["""GPT_NEOX_JAPANESE_PRETRAINED_CONFIG_ARCHIVE_MAP""", """GPTNeoXJapaneseConfig"""],
    """tokenization_gpt_neox_japanese""": ["""GPTNeoXJapaneseTokenizer"""],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	_UpperCAmelCase				: Union[str, Any]							    =				[
	    """GPT_NEOX_JAPANESE_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """GPTNeoXJapaneseForCausalLM""",
	    """GPTNeoXJapaneseLayer""",
	    """GPTNeoXJapaneseModel""",
	    """GPTNeoXJapanesePreTrainedModel""",
	]


if TYPE_CHECKING:
	from .configuration_gpt_neox_japanese import GPT_NEOX_JAPANESE_PRETRAINED_CONFIG_ARCHIVE_MAP, GPTNeoXJapaneseConfig
	from .tokenization_gpt_neox_japanese import GPTNeoXJapaneseTokenizer

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_gpt_neox_japanese import (
		    GPT_NEOX_JAPANESE_PRETRAINED_MODEL_ARCHIVE_LIST,
		    GPTNeoXJapaneseForCausalLM,
		    GPTNeoXJapaneseLayer,
		    GPTNeoXJapaneseModel,
		    GPTNeoXJapanesePreTrainedModel,
		)


else:
	import sys

	_UpperCAmelCase				: int							    =				_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)

