Machine learning notes: Concept comparison - loss function, cost function, objective function

Loss FunctionLoss  Function 

Usually for a single training sample

Given a model output  \hat{y}and a true value y, the loss function isL=f(\hat{y},y)

Cost  FunctionCost  Function

Usually the total loss over the entire training set (or a mini-batch when using mini-batch gradient descent)

J=\sum_{i=1}^N f(y_i,\hat{y_i})

Objective  Function

Represents any function that wishes to be optimized

The cost function is a type of objective function

Guess you like

Origin blog.csdn.net/qq_40206371/article/details/133187920