
'''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  snake_case_		(    __SCREAMING_SNAKE_CASE :			dict							):
						return (data["data"], data["target"])
def  snake_case_		(    __SCREAMING_SNAKE_CASE :			np.ndarray				,				__SCREAMING_SNAKE_CASE :			np.ndarray				,				__SCREAMING_SNAKE_CASE :			np.ndarray							):
						lowercase_     :					int													=	XGBRegressor(verbosity=0				,				random_state=42							)
						xgb.fit(_SCREAMING_SNAKE_CASE				,				_SCREAMING_SNAKE_CASE							)
						# Predict target for test data
						lowercase_     :					str													=	xgb.predict(_SCREAMING_SNAKE_CASE							)
						lowercase_     :					List[str]													=	predictions.reshape(len(_SCREAMING_SNAKE_CASE							)				,				1							)
						return predictions
def  snake_case_		(    ):
						lowercase_     :					Dict													=	fetch_california_housing()
						lowercase_     :					Dict													=	data_handling(_SCREAMING_SNAKE_CASE							)
						lowercase_     :					Tuple													=	train_test_split(
						    _SCREAMING_SNAKE_CASE				,				_SCREAMING_SNAKE_CASE				,				test_size=0.25				,				random_state=1							)
						lowercase_     :					Dict													=	xgboost(_SCREAMING_SNAKE_CASE				,				_SCREAMING_SNAKE_CASE				,				_SCREAMING_SNAKE_CASE							)
						# Error printing
						print(F'''Mean Absolute Error : {mean_absolute_error(_SCREAMING_SNAKE_CASE				,				_SCREAMING_SNAKE_CASE							)}'''							)
						print(F'''Mean Square Error  : {mean_squared_error(_SCREAMING_SNAKE_CASE				,				_SCREAMING_SNAKE_CASE							)}'''							)


if __name__ == "__main__":
							import doctest

							doctest.testmod(verbose=True)
							main()





'''simple docstring'''







from maths.is_square_free import is_square_free
from maths.prime_factors import prime_factors
def  snake_case_		(    __SCREAMING_SNAKE_CASE :			int							):



						"""simple docstring"""





						lowercase_     :					Tuple													=	prime_factors(__SCREAMING_SNAKE_CASE							)
						if is_square_free(__SCREAMING_SNAKE_CASE							):
												return -1 if len(__SCREAMING_SNAKE_CASE							) % 2 else 1
						return 0


if __name__ == "__main__":
							import doctest

							doctest.testmod()



