#loss function vs cost function
6 messages · Page 1 of 1 (latest)
This one also confused me when i was learning ML think as simple … you use loss function when you measure the predicted output with actual on a** singlr sample**
And in cost function you take the average loss of thr overall dataset we use cost function to find the overall loss so then we can use gradient decent to minimise that losss….
so the idea is loss is calculated when we predict say outputs for a single batch but cost function is the average of these loss function across multiple batches?
Question though, why do we need both?
How would you calculate calculate the average error of each batch when you dont know the individual one??
no but why can't we just have the loss function which is the error of each batch