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


lowerCamelCase_    :		List[Any]							=	logging.get_logger(__name__)

lowerCamelCase_    :		str							=	{
    """Visual-Attention-Network/van-base""": (
        """https://huggingface.co/Visual-Attention-Network/van-base/blob/main/config.json"""
    ),
}


class 						a__							(       __snake_case		):
			A__    :       Tuple        =      'van'



			def __init__(						self				,						UpperCAmelCase=2_2_4				,						UpperCAmelCase=3				,						UpperCAmelCase=[7, 3, 3, 3]				,						UpperCAmelCase=[4, 2, 2, 2]				,						UpperCAmelCase=[6_4, 1_2_8, 3_2_0, 5_1_2]				,						UpperCAmelCase=[3, 3, 1_2, 3]				,						UpperCAmelCase=[8, 8, 4, 4]				,						UpperCAmelCase="gelu"				,						UpperCAmelCase=0.02				,						UpperCAmelCase=1e-6				,						UpperCAmelCase=1e-2				,						UpperCAmelCase=0.0				,						UpperCAmelCase=0.0				,						**UpperCAmelCase				,						)			->   List[Any]:
								super().__init__(**UpperCAmelCase   )
								__a		 =       image_size
								__a		 =       num_channels
								__a		 =       patch_sizes
								__a		 =       strides
								__a		 =       hidden_sizes
								__a		 =       depths
								__a		 =       mlp_ratios
								__a		 =       hidden_act
								__a		 =       initializer_range
								__a		 =       layer_norm_eps
								__a		 =       layer_scale_init_value
								__a		 =       drop_path_rate
								__a		 =       dropout_rate





import numpy as np
from sklearn.datasets import fetch_california_housing
from sklearn.metrics import mean_absolute_error, mean_squared_error
from sklearn.model_selection import train_test_split
from xgboost import XGBRegressor
def 							lowerCAmelCase(     __lowerCamelCase						):
					return (data["data"], data["target"])
def 							lowerCAmelCase(     __lowerCamelCase				,    __lowerCamelCase				,    __lowerCamelCase						):
					__a		 =       XGBRegressor(verbosity=0				,    random_state=42						)
					xgb.fit(__lowerCamelCase				,    __lowerCamelCase						)
					# Predict target for test data
					__a		 =       xgb.predict(__lowerCamelCase						)
					__a		 =       predictions.reshape(len(__lowerCamelCase						)				,    1						)
					return predictions
def 							lowerCAmelCase(     ):
					__a		 =       fetch_california_housing()
					__a ,				__a		 =       data_handling(__lowerCamelCase						)
					__a ,				__a ,				__a ,				__a		 =       train_test_split(
					    __lowerCamelCase				,    __lowerCamelCase				,    test_size=0.25				,    random_state=1						)
					__a		 =       xgboost(__lowerCamelCase				,    __lowerCamelCase				,    __lowerCamelCase						)
					# Error printing
					print(f'''Mean Absolute Error : {mean_absolute_error(__lowerCamelCase				,    __lowerCamelCase						)}'''						)
					print(f'''Mean Square Error  : {mean_squared_error(__lowerCamelCase				,    __lowerCamelCase						)}'''						)


if __name__ == "__main__":
	import doctest

	doctest.testmod(verbose=True)
	main()




