thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

AI & Machine Learning · Intermediate

Loss Function

A function that measures how far a model's predictions are from the true values; training minimizes it.

Definition

Also called a cost or objective function, the loss provides the signal for gradient-based optimization. Mean squared error is typical for regression, cross-entropy for classification and language modeling. The choice of loss encodes what kinds of mistakes matter most.

Exam tip

Loss guides training; metrics such as accuracy or F1 report performance to humans. They can differ.

Related terms