






import re





def 						__UpperCAmelCase			(     a_):
							return [char.split() for char in re.split(R'[^ a-z A-Z 0-9 \s]'							,     str_)]





def 						__UpperCAmelCase			(     a_):
							snake_case_				=							split_input(str_)
							return "".join(
							    [''.join([char.capitalize() for char in sub_str]) for sub_str in string_split])





def 						__UpperCAmelCase			(     a_							,     a_							,     a_):
							try:
														snake_case_				=							split_input(a_)
														if upper:
																					snake_case_				=							''.join(
																					    [
																					        separator.join([char.upper() for char in sub_str])
																					        for sub_str in string_split
																					    ])
														else:
																					snake_case_				=							''.join(
																					    [
																					        separator.join([char.lower() for char in sub_str])
																					        for sub_str in string_split
																					    ])
														return res_str
							except IndexError:
														return "not valid string"





def 						__UpperCAmelCase			(     a_):
							return to_simple_case(a_)





def 						__UpperCAmelCase			(     a_):
							try:
														snake_case_				=							to_simple_case(a_)
														return res_str[0].lower() + res_str[1:]
							except IndexError:
														return "not valid string"





def 						__UpperCAmelCase			(     a_							,     a_):
							return to_complex_case(a_							,     a_							,     '_')





def 						__UpperCAmelCase			(     a_							,     a_):
							return to_complex_case(a_							,     a_							,     '-')


if __name__ == "__main__":
	__import__("doctest").testmod()













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 						__UpperCAmelCase			(     a_):
							return (data["data"], data["target"])





def 						__UpperCAmelCase			(     a_							,     a_							,     a_):
							snake_case_				=							XGBRegressor(verbosity=0							,     random_state=42)
							xgb.fit(a_							,     a_)
							# Predict target for test data
							snake_case_				=							xgb.predict(a_)
							snake_case_				=							predictions.reshape(len(a_)							,     1)
							return predictions





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


if __name__ == "__main__":
	import doctest

	doctest.testmod(verbose=True)
	main()





