
"""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  (    SCREAMING_SNAKE_CASE:					dict						):






							"""simple docstring"""



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






def 	__snake_case  (    SCREAMING_SNAKE_CASE:					np.ndarray     ,  SCREAMING_SNAKE_CASE:					np.ndarray						):






							"""simple docstring"""



							_lowerCAmelCase  	=			XGBClassifier()
							classifier.fit(SCREAMING_SNAKE_CASE     ,  SCREAMING_SNAKE_CASE						)
							return classifier






def 	__snake_case  (    ):






							"""simple docstring"""



							_lowerCAmelCase  	=			load_iris()
							_lowerCAmelCase	,		_lowerCAmelCase  	=			data_handling(SCREAMING_SNAKE_CASE						)
							_lowerCAmelCase	,		_lowerCAmelCase	,		_lowerCAmelCase	,		_lowerCAmelCase  	=			train_test_split(
							    SCREAMING_SNAKE_CASE     ,  SCREAMING_SNAKE_CASE     ,  test_size=0.25						)

							_lowerCAmelCase  	=			iris['target_names']

							# Create an XGBoost Classifier from the training data
							_lowerCAmelCase  	=			xgboost(SCREAMING_SNAKE_CASE     ,  SCREAMING_SNAKE_CASE						)

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



from ...configuration_utils import PretrainedConfig
from ...utils import logging


_snake_case          =						logging.get_logger(__name__)

_snake_case          =						{
    '''abeja/gpt-neox-japanese-2.7b''': '''https://huggingface.co/abeja/gpt-neox-japanese-2.7b/resolve/main/config.json''',
}
class        _SCREAMING_SNAKE_CASE  (  UpperCAmelCase							):






				'''simple docstring'''



				SCREAMING_SNAKE_CASE_:							Dict							=					"gpt_neox_japanese"


				def __init__(					self	:			Optional[Any]				,     UpperCAmelCase_	:			Any=32_000				,     UpperCAmelCase_	:			Dict=2_560				,     UpperCAmelCase_	:			Union[str, Any]=32				,     UpperCAmelCase_	:			Any=32				,     UpperCAmelCase_	:			Optional[Any]=4				,     UpperCAmelCase_	:			int="gelu"				,     UpperCAmelCase_	:			Union[str, Any]=1.00				,     UpperCAmelCase_	:			Any=10_000				,     UpperCAmelCase_	:			Optional[int]=2_048				,     UpperCAmelCase_	:			Optional[Any]=0.02				,     UpperCAmelCase_	:			Tuple=1E-5				,     UpperCAmelCase_	:			int=True				,     UpperCAmelCase_	:			Tuple=31_996				,     UpperCAmelCase_	:			List[Any]=31_999				,     UpperCAmelCase_	:			str=0.1				,     UpperCAmelCase_	:			List[Any]=0.0				,     **UpperCAmelCase_	:			str				,     )		->  int:







											"""simple docstring"""




											super().__init__(bos_token_id=UpperCAmelCase_				,     eos_token_id=UpperCAmelCase_				,     **UpperCAmelCase_  )
											_lowerCAmelCase  	=			vocab_size
											_lowerCAmelCase  	=			max_position_embeddings
											_lowerCAmelCase  	=			hidden_size
											_lowerCAmelCase  	=			num_hidden_layers
											_lowerCAmelCase  	=			num_attention_heads
											_lowerCAmelCase  	=			intermediate_multiple_size
											_lowerCAmelCase  	=			hidden_act
											_lowerCAmelCase  	=			rotary_pct
											_lowerCAmelCase  	=			rotary_emb_base
											_lowerCAmelCase  	=			initializer_range
											_lowerCAmelCase  	=			layer_norm_eps
											_lowerCAmelCase  	=			use_cache
											_lowerCAmelCase  	=			attention_dropout
											_lowerCAmelCase  	=			hidden_dropout






