





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 							__snake_case							(    lowerCAmelCase_	)				->						tuple:
    return (data["data"], data["target"])


def 							__snake_case							(    lowerCAmelCase_ ,							lowerCAmelCase_ ,							lowerCAmelCase_	)				->						np.ndarray:
    SCREAMING_SNAKE_CASE__											=			XGBRegressor(verbosity=0 ,							random_state=4_2	)
    xgb.fit(lowerCAmelCase_ ,							lowerCAmelCase_	)
    # Predict target for test data
    SCREAMING_SNAKE_CASE__											=			xgb.predict(lowerCAmelCase_	)
    SCREAMING_SNAKE_CASE__											=			predictions.reshape(len(lowerCAmelCase_	) ,							1	)
    return predictions


def 							__snake_case							(    )				->						None:
    SCREAMING_SNAKE_CASE__											=			fetch_california_housing()
    SCREAMING_SNAKE_CASE__				,		SCREAMING_SNAKE_CASE__											=			data_handling(lowerCAmelCase_	)
    SCREAMING_SNAKE_CASE__				,		SCREAMING_SNAKE_CASE__				,		SCREAMING_SNAKE_CASE__				,		SCREAMING_SNAKE_CASE__											=			train_test_split(
        lowerCAmelCase_ ,							lowerCAmelCase_ ,							test_size=0.25 ,							random_state=1	)
    SCREAMING_SNAKE_CASE__											=			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()


"""simple docstring"""



from itertools import permutations
def 					lowerCamelCase   (     _snake_case ):
    if num[3] % 2 != 0:
        return False

    if (num[2] + num[3] + num[4]) % 3 != 0:
        return False

    if num[5] % 5 != 0:
        return False

    UpperCAmelCase__	:      List[str]     							=					[7, 11, 13, 17]
    for i, test in enumerate(_snake_case ):
        if (num[i + 4] * 100 + num[i + 5] * 10 + num[i + 6]) % test != 0:
            return False
    return True
def 					lowerCamelCase   (     _snake_case = 10 ):
    return sum(
        int(''.join(map(_snake_case    ,_snake_case ) ) )
        for num in permutations(range(_snake_case ) )
        if is_substring_divisible(_snake_case ) )


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

