


'''simple docstring'''

from ... import PretrainedConfig


a_						:       Union[str, Any]      			=				{
    "sijunhe/nezha-cn-base": "https://huggingface.co/sijunhe/nezha-cn-base/resolve/main/config.json",
}





class   snake_case					(					_UpperCAmelCase    ):





		"""simple docstring"""




		_lowerCamelCase						=						NEZHA_PRETRAINED_CONFIG_ARCHIVE_MAP
		_lowerCamelCase						=						"nezha"






		def __init__(					self    ,						UpperCamelCase=2_1128    ,						UpperCamelCase=768    ,						UpperCamelCase=12    ,						UpperCamelCase=12    ,						UpperCamelCase=3072    ,						UpperCamelCase="gelu"    ,						UpperCamelCase=0.1    ,						UpperCamelCase=0.1    ,						UpperCamelCase=512    ,						UpperCamelCase=64    ,						UpperCamelCase=2    ,						UpperCamelCase=0.02    ,						UpperCamelCase=1e-12    ,						UpperCamelCase=0.1    ,						UpperCamelCase=0    ,						UpperCamelCase=2    ,						UpperCamelCase=3    ,						UpperCamelCase=True    ,						**UpperCamelCase    ,						):







			"""simple docstring"""
			super().__init__(pad_token_id=lowercase_    ,						bos_token_id=lowercase_    ,						eos_token_id=lowercase_    ,						**lowercase_  )

			lowerCamelCase_  				=						vocab_size
			lowerCamelCase_  				=						hidden_size
			lowerCamelCase_  				=						num_hidden_layers
			lowerCamelCase_  				=						num_attention_heads
			lowerCamelCase_  				=						hidden_act
			lowerCamelCase_  				=						intermediate_size
			lowerCamelCase_  				=						hidden_dropout_prob
			lowerCamelCase_  				=						attention_probs_dropout_prob
			lowerCamelCase_  				=						max_position_embeddings
			lowerCamelCase_  				=						max_relative_position
			lowerCamelCase_  				=						type_vocab_size
			lowerCamelCase_  				=						initializer_range
			lowerCamelCase_  				=						layer_norm_eps
			lowerCamelCase_  				=						classifier_dropout
			lowerCamelCase_  				=						use_cache







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





def __snake_case      (   UpperCAmelCase_		:		np.ndarray      ,       UpperCAmelCase_		:		np.ndarray	):
 lowerCamelCase_  				=						XGBClassifier()
 classifier.fit(UpperCAmelCase_      ,       UpperCAmelCase_	)
 return classifier





def __snake_case      (   ):
 lowerCamelCase_  				=						load_iris()
 lowerCamelCase_				,lowerCamelCase_  				=						data_handling(UpperCAmelCase_	)
 lowerCamelCase_				,lowerCamelCase_				,lowerCamelCase_				,lowerCamelCase_  				=						train_test_split(
     UpperCAmelCase_      ,       UpperCAmelCase_      ,       test_size=0.25	)

 lowerCamelCase_  				=						iris["target_names"]

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



