H

Huber Loss

HL

Huber Loss is a loss function used in regression that is less sensitive to outliers than mean squared error.

Huber Loss

Huber Loss is a popular loss function used in regression problems, particularly in machine learning and statistics. It combines the advantages of two other loss functions: mean squared error (MSE) and mean absolute error (MAE). Unlike MSE, which can be heavily influenced by outliers due to the squaring of errors, Huber Loss is designed to be robust against such anomalies.

The Huber Loss is defined by a parameter called the threshold (often denoted as δ), which determines the point at which the loss function transitions from quadratic to linear. For residuals (the differences between actual and predicted values) that are less than δ in absolute value, Huber Loss behaves like MSE, using the formula:

Huber Loss = 0.5 * (residual)^2

For residuals that exceed δ, the loss is calculated using the absolute error formula, which is less sensitive to large errors:

Huber Loss = δ * (|residual| – 0.5 * δ)

This combination allows Huber Loss to provide a smooth gradient for optimization while limiting the influence of outliers. When selecting δ, it is important to consider the scale of the data and the specific characteristics of the dataset.

Huber Loss is particularly useful in scenarios where a dataset contains outliers that could skew the results if MSE were used exclusively. It strikes a balance between maintaining sensitivity to small errors and robustness against large deviations, making it a versatile choice for many regression applications.

Ctrl + /