...

/

Loss Functions

Loss Functions

Learn the basic concepts of loss functions.

The loss function evaluates how well our algorithm models our datasets. It calculates the difference between the predicted output and the ground truth of a single training example. It’s also known as the error function.

It represents how far off the predicted output is from the expected output. We can think of the loss function as the penalty for failing to get the expected output.

Most optimization problems use loss functions. The main goal is to minimize the loss, which will maximize the accuracy. The lower the loss, the better our model is.

Given the following synthetic data, we can calculate the total loss for price predictions for metals ($/troy ounce) by:

  • Subtracting between predictions and actual value.
  • Getting the absolute value of the number.
Metals Predictions Actual
...
Access this course and 1400+ top-rated courses and projects.