# L1 and L2 Loss Function

L1 and L2 are two loss functions in machine learning which are used to minimize the error.

**L1 Loss function stands for Least Absolute Deviations.** Also known as LAD.\
&#x20;$$L1LossFunction = \sum\_{i=1}^n |y\_{true}-y\_{predicted}|$$&#x20;

\
**L2 Loss function stands for Least Square Errors.** Also known as LS.\
&#x20;$$L2LossFunction = \sum\_{i=1}^n (y\_{true}-y\_{predicted})^2$$&#x20;

{% embed url="<https://afteracademy.com/blog/what-are-l1-and-l2-loss-functions>" %}
