rl_equation_solver.utilities.loss.LossMixin
- class LossMixin[source]
- Bases: - object- Mixin class with collection of loss functions - Methods - huber_loss(x, y[, delta])- Huber loss. - l2_loss(x, y)- L2 Loss - smooth_l1_loss(x, y)- Smooth L1 Loss - huber_loss(x, y, delta=1.0)[source]
- Huber loss. Huber loss, also known as Smooth Mean Absolute Error, is a loss function used in various machine learning and optimization problems, particularly in regression tasks. It combines the properties of both Mean Squared Error (MSE) and Mean Absolute Error (MAE) loss functions, providing a balance between the two. \[ L(y, f(x)) = \begin{cases} \begin{split} \frac{1}{2} (y - f(x))^2, & \text{ if } |y - f(x)| \leq \delta \\ \delta |y - f(x)| - \frac{1}{2} \delta^2, & \text{ otherwise} \end{split} \end{cases} \]