Logo
Pattern

Discover published sets by community

Explore tens of thousands of sets crafted by our community.

Loss Functions Explained

10

Flashcards

0/10

Still learning
StarStarStarStar

Kullback-Leibler Divergence (KLD)

StarStarStarStar

KLD is a measure of how one probability distribution diverges from a second, expected probability distribution, used in various tasks like variational autoencoders.

KLD=iP(i)log(P(i)Q(i))KLD = \sum_i P(i) \log\left(\frac{P(i)}{Q(i)}\right)

StarStarStarStar

Cross-Entropy Loss

StarStarStarStar

Cross-Entropy quantifies the difference between two probability distributions for a given random variable or set of events, widely used in classification tasks.

CE=iyilog(y^i)CE = -\sum_{i} y_i \log(\hat{y}_i)

StarStarStarStar

Mean Squared Error (MSE)

StarStarStarStar

MSE measures the average squared difference between estimated values and the actual value, commonly used in regression problems.

MSE=1ni=1n(YiY^i)2MSE = \frac{1}{n}\sum_{i=1}^{n}(Y_i - \hat{Y}_i)^2

StarStarStarStar

Huber Loss

StarStarStarStar

Huber Loss is less sensitive to outliers in data than MSE and combines the properties of MSE and MAE. It's quadratic for small errors, and linear for large errors.

Huber={12(YiY^i)2for YiY^iδ,δYiY^i12δ2otherwise.Huber = \begin{cases}\frac{1}{2}(Y_i - \hat{Y}_i)^2 & \text{for } |Y_i - \hat{Y}_i| \leq \delta,\\ \delta |Y_i - \hat{Y}_i| - \frac{1}{2}\delta^2 & \text{otherwise.}\end{cases}

StarStarStarStar

Poisson Loss

StarStarStarStar

Poisson Loss is used when modeling count data in regression problems. It assumes the target values, typically counts, are Poisson distributed and the loss is the log-likelihood of that distribution.

Poisson=i(Y^iYilog(Y^i))Poisson = \sum_i (\hat{Y}_i - Y_ilog(\hat{Y}_i))

StarStarStarStar

Softmax Loss

StarStarStarStar

Softmax Loss, or Multinomial Logistic Loss, extends Logistic Loss to multi-class classification problems. It applies the softmax function to the raw output scores, which are then used in the Cross-Entropy Loss.

Softmax=iyilog(ezijezj)Softmax = -\sum_{i} y_i \log(\frac{e^{z_i}}{\sum_{j} e^{z_j}})

StarStarStarStar

Hinge Loss

StarStarStarStar

Hinge loss is often used for binary classification tasks, such as Support Vector Machines. It's defined as the maximum of zero or the difference between one and the product of the true label and the predicted score.

Hinge=max(0,1yiy^i)Hinge = \max(0, 1 - y_i \cdot \hat{y}_i)

StarStarStarStar

Logistic Loss

StarStarStarStar

Also known as Binary Cross-Entropy Loss, it's used for binary classification problems. It measures the loss between predicted probabilities and target binary state.

Logistic=yilog(y^i)(1yi)log(1y^i)Logistic = -y_i \log(\hat{y}_i) - (1 - y_i) \log(1 - \hat{y}_i)

StarStarStarStar

Mean Absolute Error (MAE)

StarStarStarStar

MAE measures the average of the absolute errors (i.e., the absolute differences between the predictions and the actual observations), commonly used in regression.

MAE=1ni=1nYiY^iMAE = \frac{1}{n}\sum_{i=1}^{n}|Y_i - \hat{Y}_i|

StarStarStarStar

Focal Loss

StarStarStarStar

Focal Loss modifies Cross-Entropy Loss to focus more on hard-to-classify examples, it is particularly useful for imbalanced datasets in object detection.

Focal=α(1y^i)γlog(y^i)Focal = -\alpha(1 - \hat{y}_i)^\gamma \log(\hat{y}_i)

Know
0
Still learning
Click to flip
Know
0
Logo

© Hypatia.Tech. 2024 All rights reserved.