






from itertools import product

def   snake_case (UpperCAmelCase__     ,   UpperCAmelCase__  )	->    Optional[Any]:






  """simple docstring"""




  UpperCamelCase_: Optional[Any]   				=    sides_number
  UpperCamelCase_: List[str]   				=    max_face_number * dice_number
  UpperCamelCase_: Tuple   				=    [0] * (max_total + 1)

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

  return totals_frequencies

def   snake_case ()	->    str:






  """simple docstring"""




  UpperCamelCase_: Tuple   				=    total_frequency_distribution(
      sides_number=4     ,   dice_number=9  )
  UpperCamelCase_: Any   				=    total_frequency_distribution(
      sides_number=6     ,   dice_number=6  )

  UpperCamelCase_: Dict   				=    0
  UpperCamelCase_: List[str]   				=    9
  UpperCamelCase_: List[str]   				=    4 * 9
  UpperCamelCase_: Union[str, Any]   				=    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]  )

  UpperCamelCase_: Optional[int]   				=    (4**9) * (6**6)
  UpperCamelCase_: Optional[Any]   				=    peter_wins_count / total_games_number

  UpperCamelCase_: int   				=    round(__a     ,   ndigits=7  )

  return rounded_peter_win_probability


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







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

def   snake_case (UpperCAmelCase__     ,   UpperCAmelCase__     ,   UpperCAmelCase__  )	->    np.ndarray:
  UpperCamelCase_: Dict   				=    XGBRegressor(verbosity=0     ,   random_state=4_2  )
  xgb.fit(UpperCAmelCase__     ,   UpperCAmelCase__  )
  # Predict target for test data
  UpperCamelCase_: int   				=    xgb.predict(UpperCAmelCase__  )
  UpperCamelCase_: Any   				=    predictions.reshape(len(UpperCAmelCase__  )     ,   1  )
  return predictions

def   snake_case ()	->    None:
  UpperCamelCase_: Union[str, Any]   				=    fetch_california_housing()
  UpperCamelCase_				,UpperCamelCase_: Tuple   				=    data_handling(UpperCAmelCase__  )
  UpperCamelCase_				,UpperCamelCase_				,UpperCamelCase_				,UpperCamelCase_: Optional[Any]   				=    train_test_split(
      UpperCAmelCase__     ,   UpperCAmelCase__     ,   test_size=0.25     ,   random_state=1  )
  UpperCamelCase_: Union[str, Any]   				=    xgboost(UpperCAmelCase__     ,   UpperCAmelCase__     ,   UpperCAmelCase__  )
  # Error printing
  print(F'''Mean Absolute Error : {mean_absolute_error(UpperCAmelCase__     ,   UpperCAmelCase__  )}'''  )
  print(F'''Mean Square Error  : {mean_squared_error(UpperCAmelCase__     ,   UpperCAmelCase__  )}'''  )


if __name__ == "__main__":
   import doctest

   doctest.testmod(verbose=True)
   main()