"""
Metrics for distances and losses
"""

import numpy as np


def euclidean_distance(a, b):
    """
    Euclidean distance: https://en.wikipedia.org/wiki/Euclidean_distance
    """

    squared_diff = (a - b) ** 2
    sum_squared_diff = np.sum(squared_diff)
    return np.sqrt(sum_squared_diff)


def mean_squared_error(y_true, y_pred):
    """Compute the Mean Squared Error between two vectors."""

    return np.square(y_true - y_pred).mean()
