Overview of cost functions
These two functions are used to calculate the loss and then the cost of our models.
Loss being the difference between our predictions and ground labels for an instance while cost being the average sum of differences from our predictions.
The following are the few over arching differences
Formula's of each function
Square Mean Error
Log Loss
Let's see the two functions in action:
y | y_hat | LOG LOSS | SME |
---|---|---|---|
0.1 | 0.9 | 2.08 | 0.64 |
0.2 | 0.8 | 1.33 | 0.36 |
0.3 | 0.7 | 0.95 | 0.16 |
0.4 | 0.6 | 0.75 | 0.04 |
0.5 | 0.5 | 0.69 | 0.0 |
0.6 | 0.4 | 0.75 | 0.04 |
0.7 | 0.3 | 0.95 | 0.16 |
0.8 | 0.2 | 1.33 | 0.36 |
0.9 | 0.1 | 2.08 | 0.64 |
Top comments (0)