



'''simple docstring'''





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





    '''simple docstring'''


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




def        lowerCamelCase  (				_snake_case  :						np.ndarray     ,_snake_case  :						np.ndarray     ,_snake_case  :						np.ndarray       ):





    '''simple docstring'''


    lowercase__		       =						XGBRegressor(verbosity=0     ,random_state=42       )
    xgb.fit(_snake_case     ,_snake_case       )
    # Predict target for test data
    lowercase__		       =						xgb.predict(_snake_case       )
    lowercase__		       =						predictions.reshape(len(_snake_case       )     ,1       )
    return predictions




def        lowerCamelCase  (				):





    '''simple docstring'''


    lowercase__		       =						fetch_california_housing()
    lowercase__       ,       lowercase__		       =						data_handling(_snake_case       )
    lowercase__       ,       lowercase__       ,       lowercase__       ,       lowercase__		       =						train_test_split(
        _snake_case     ,_snake_case     ,test_size=0.25     ,random_state=1       )
    lowercase__		       =						xgboost(_snake_case     ,_snake_case     ,_snake_case       )
    # Error printing
    print(f'''Mean Absolute Error : {mean_absolute_error(_snake_case     ,_snake_case       )}'''       )
    print(f'''Mean Square Error  : {mean_squared_error(_snake_case     ,_snake_case       )}'''       )


if __name__ == "__main__":
 import doctest

 doctest.testmod(verbose=True)
 main()









'''simple docstring'''





def        lowerCamelCase  (				_snake_case  :						int     ,_snake_case  :						int       ):





    '''simple docstring'''


    return x if y == 0 else greatest_common_divisor(_snake_case     ,x % y       )




def        lowerCamelCase  (				_snake_case  :						int     ,_snake_case  :						int       ):





    '''simple docstring'''


    return (x * y) // greatest_common_divisor(_snake_case     ,_snake_case       )




def        lowerCamelCase  (				_snake_case  :						int = 20       ):





    '''simple docstring'''


    lowercase__		       =						1
    for i in range(1     ,n + 1       ):
        lowercase__		       =						lcm(_snake_case     ,_snake_case       )
    return g


if __name__ == "__main__":
 print(f'''{solution() = }''')




