



'''simple docstring'''






from itertools import product
def    lowerCamelCase__ (		_A				,    _A       ):
  a		:      int       =  sides_number
  a		:      Tuple       =  max_face_number * dice_number
  a		:      str       =  [0] * (max_total + 1)

  a		:      Optional[Any]       =  1
  a		:      List[Any]       =  range(_A				,    max_face_number + 1       )
  for dice_numbers in product(_A				,    repeat=_A       ):
    a		:      Any       =  sum(_A       )
    totals_frequencies[total] += 1

  return totals_frequencies
def    lowerCamelCase__ (		):
  a		:      List[Any]       =  total_frequency_distribution(
      sides_number=4				,    dice_number=9       )
  a		:      Dict       =  total_frequency_distribution(
      sides_number=6				,    dice_number=6       )

  a		:      Any       =  0
  a		:      Any       =  9
  a		:      Tuple       =  4 * 9
  a		:      Optional[int]       =  6
  for peter_total in range(_A				,    max_peter_total + 1       ):
    peter_wins_count += peter_totals_frequencies[peter_total] * sum(
        colin_totals_frequencies[min_colin_total:peter_total]       )

  a		:      List[str]       =  (4**9) * (6**6)
  a		:      Tuple       =  peter_wins_count / total_games_number

  a		:      Optional[Any]       =  round(_A				,    ndigits=7       )

  return rounded_peter_win_probability


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




'''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__ (		_A       ):
  return (data["data"], data["target"])
def    lowerCamelCase__ (		_A				,    _A				,    _A       ):
  a		:      Any       =  XGBRegressor(verbosity=0				,    random_state=42       )
  xgb.fit(_A				,    _A       )
  # Predict target for test data
  a		:      Any       =  xgb.predict(_A       )
  a		:      Any       =  predictions.reshape(len(_A       )				,    1       )
  return predictions
def    lowerCamelCase__ (		):
  a		:      Optional[int]       =  fetch_california_housing()
  a     ,			a		:      Optional[Any]       =  data_handling(_A       )
  a     ,			a     ,			a     ,			a		:      Dict       =  train_test_split(
      _A				,    _A				,    test_size=0.25				,    random_state=1       )
  a		:      List[str]       =  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()