10 Commonly Used Loss Functions Explained with Python Code

Understanding Loss Functions in Machine Learning

Carla Martins
Towards AI
Published in
9 min readAug 17, 2022

--

Photo by Maxwell Nelson on Unsplash
Table of contents:
What is a loss function?
Loss Functions vs Metrics
Why are loss functions applied while building the model?
Regression:
Mean Squared Error (MSE)
Mean Absolute Error (MAE)
Root Mean Squared Error (RMSE)
Mean Bias Error (MBE)
Huber Loss

--

--

Compulsive learner. Passionate about technology. Speaks C, R, Python, SQL, Haskell, Java and LaTeX. Interested in creating solutions.