





from math import cos, sin





def 							__lowerCAmelCase(					_SCREAMING_SNAKE_CASE							)       ->   list[list[float]]:




    """simple docstring"""




    _A    =       float(_SCREAMING_SNAKE_CASE							)
    return [[scaling_factor * int(x == y							) for x in range(2							)] for y in range(2							)]





def 							__lowerCAmelCase(					_SCREAMING_SNAKE_CASE							)       ->   list[list[float]]:




    """simple docstring"""




    _A    =       cos(_SCREAMING_SNAKE_CASE							), sin(_SCREAMING_SNAKE_CASE							)
    return [[c, -s], [s, c]]





def 							__lowerCAmelCase(					_SCREAMING_SNAKE_CASE							)       ->   list[list[float]]:




    """simple docstring"""




    _A    =       cos(_SCREAMING_SNAKE_CASE							), sin(_SCREAMING_SNAKE_CASE							)
    _A    =       c * s
    return [[c * c, cs], [cs, s * s]]





def 							__lowerCAmelCase(					_SCREAMING_SNAKE_CASE							)       ->   list[list[float]]:




    """simple docstring"""




    _A    =       cos(_SCREAMING_SNAKE_CASE							), sin(_SCREAMING_SNAKE_CASE							)
    _A    =       c * s
    return [[2 * c - 1, 2 * cs], [2 * cs, 2 * s - 1]]


print(f"    {scaling(5) = }")
print(f"  {rotation(45) = }")
print(f"{projection(45) = }")



print(f"{reflection(45) = }")












import numpy as np





def 							__lowerCAmelCase(					_SCREAMING_SNAKE_CASE       ,    _SCREAMING_SNAKE_CASE							)       ->   List[Any]:




    """simple docstring"""




    _A    =       np.array(_SCREAMING_SNAKE_CASE							)
    _A    =       np.array(_SCREAMING_SNAKE_CASE							)

    _A    =       abs(predict - actual							)
    _A    =       difference.mean()

    return score





def 							__lowerCAmelCase(					_SCREAMING_SNAKE_CASE       ,    _SCREAMING_SNAKE_CASE							)       ->   Optional[int]:




    """simple docstring"""




    _A    =       np.array(_SCREAMING_SNAKE_CASE							)
    _A    =       np.array(_SCREAMING_SNAKE_CASE							)

    _A    =       predict - actual
    _A    =       np.square(_SCREAMING_SNAKE_CASE							)

    _A    =       square_diff.mean()
    return score





def 							__lowerCAmelCase(					_SCREAMING_SNAKE_CASE       ,    _SCREAMING_SNAKE_CASE							)       ->   Tuple:




    """simple docstring"""




    _A    =       np.array(_SCREAMING_SNAKE_CASE							)
    _A    =       np.array(_SCREAMING_SNAKE_CASE							)

    _A    =       predict - actual
    _A    =       np.square(_SCREAMING_SNAKE_CASE							)
    _A    =       square_diff.mean()
    _A    =       np.sqrt(_SCREAMING_SNAKE_CASE							)
    return score





def 							__lowerCAmelCase(					_SCREAMING_SNAKE_CASE       ,    _SCREAMING_SNAKE_CASE							)       ->   List[Any]:




    """simple docstring"""




    _A    =       np.array(_SCREAMING_SNAKE_CASE							)
    _A    =       np.array(_SCREAMING_SNAKE_CASE							)

    _A    =       np.log(predict + 1							)
    _A    =       np.log(actual + 1							)

    _A    =       log_predict - log_actual
    _A    =       np.square(_SCREAMING_SNAKE_CASE							)
    _A    =       square_diff.mean()

    _A    =       np.sqrt(_SCREAMING_SNAKE_CASE							)

    return score





def 							__lowerCAmelCase(					_SCREAMING_SNAKE_CASE       ,    _SCREAMING_SNAKE_CASE							)       ->   Optional[int]:




    """simple docstring"""




    _A    =       np.array(_SCREAMING_SNAKE_CASE							)
    _A    =       np.array(_SCREAMING_SNAKE_CASE							)

    _A    =       predict - actual
    _A    =       np.sum(_SCREAMING_SNAKE_CASE							) / len(_SCREAMING_SNAKE_CASE							)
    _A    =       np.sum(_SCREAMING_SNAKE_CASE							) / len(_SCREAMING_SNAKE_CASE							)
    # print(numerator, denumerator)
    _A    =       float(_SCREAMING_SNAKE_CASE							) / denumerator * 100

    return score





def 							__lowerCAmelCase(					_SCREAMING_SNAKE_CASE       ,    _SCREAMING_SNAKE_CASE							)       ->   Dict:




    """simple docstring"""




    return np.mean(np.array(_SCREAMING_SNAKE_CASE							) == np.array(_SCREAMING_SNAKE_CASE							)							)





