# ML | Common Loss Functions

Loss function estimates how well particular algorithm models the provided data. Loss functions are classified into two classes based on the type of learning task –

**Regression Models :**predict continuous values.**Classification Models :**predict the output from a set of finite categorical values.

**REGRESSION LOSSES:**

**Mean squared error**

Also called as**Quadratic Loss or L2 Loss**.

It is the average of the squared difference between predictions and actual observations

where, i - ith training sample in a dataset n - number of training samples y(i) - Actual output of ith training sample y-hat(i) - Predicted value of ith traing sample

**Mean Absolute error**

Also known as**L1 Loss**.

It is the average of sum of absolute differences between predictions and actual observations.

**Mean Bias Error**

same as**MSE**. It is less accurate but could conclude if the model has a positive bias or negative bias.

**Huber Loss**

also known as**Smooth Mean Absolute Error**. It is less sensitive to outliers in data than MSE and is also differentiable at 0. It is an absolute error, which becomes quadratic when the error is tiny.

**CLASSIFICATION LOSSES:**

**Cross Entropy Loss**

also known as**Negative Log Likelihood**. It is the commonly used loss function for classification. Cross-entropy loss progress as the predicted probability diverges from actual label.**Hinge Loss**

also known as**Multi class SVM Loss**. Hinge loss is applied for maximum-margin classification, prominently for support vector machines. It is a convex function used in convex optimizers.

## Recommended Posts:

- Loss when two items are sold at same price and same percentage profit/loss
- ML | Log Loss and Mean Squared Error
- Program to calculate Profit Or Loss
- Number of triangles formed by joining vertices of n-sided polygon with two common sides and no common sides
- Calculate the loss incurred in selling the given items at discounted price
- Find cost price from given selling price and profit or loss percentage
- Program to find the profit or loss when CP of N items is equal to SP of M items
- Least Common Denominator (LCD)
- Sum of common divisors of two numbers A and B
- Common Divisors of Two Numbers
- Common prime factors of two numbers
- Count divisors of n that have at-least one digit common with n
- Print the kth common factor of two numbers
- C++ Program for Common Divisors of Two Numbers
- Divide the two given numbers by their common divisors

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.