"""simple docstring"""




def 							lowerCAmelCase(     __lowerCamelCase				,    __lowerCamelCase						):
					if a < 0 or b < 0:
										raise ValueError('the value of both inputs must be positive'						)

					__a		 =       str(bin(__lowerCAmelCase						)						)[2:]  # remove the leading "0b"
					__a		 =       str(bin(__lowerCAmelCase						)						)[2:]  # remove the leading "0b"

					__a		 =       max(len(__lowerCAmelCase						)				,    len(__lowerCAmelCase						)						)

					return "0b" + "".join(
					    str(int(char_a == '1' and char_b == '1'						)						)
					    for char_a, char_b in zip(a_binary.zfill(__lowerCAmelCase						)				,    b_binary.zfill(__lowerCAmelCase						)						)						)


if __name__ == "__main__":
	import doctest

	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 							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()




