Loss Function#
The need for loss functions#
Students take exams to evaluate how well they learn in school. Employees are evaluated by companies to measure their job performance. The thing is, sometimes we just need to know how good a person is in doing a certain task (learning/working). Loss functions are like exams to models. We use loss functions to evaluate models to quantitatively measure how they perform. This is a common metric used to measure model performance. We can compare which model performs better using this. We all want the best model to perform our task, don’t we?
What exactly is a loss function?#
A loss function takes in the decision made by a model, and returns a scalar value which we called the loss value. In deep learning, the lower the loss, the closer the predictions to the actual values, the better the model performs.