liveBook · Manning

Cross entropy loss

As explained in Machine Learning System Design

A classification loss that penalizes incorrect probabilistic predictions using the negative logarithm of the probability assigned to the true class.

Binary cross-entropy is used as a training loss for click and purchase predictions in search. These losses measure model performance, but they do not necessarily capture the business outcome the system needs. section 5.3.2

When click or purchase data is imbalanced, focal loss is an alternative: it down-weights easy examples so training focuses more on harder ones. Keep the loss in context with other measures; a classification loss may not reflect whether users are happy or spam is controlled appropriately. section 5.3.2 section 9.1.3

Search predictions

Train on clicks and purchases with binary cross-entropy, then assess outcomes with measures such as click-through rate and conversion rate. section 5.3.2

How Machine Learning System Design covers it

How deep it goes
Contrasts binary cross-entropy with focal loss for imbalanced data, without detailing the loss computation.
Examples
Uses search clicks and purchases as prediction targets, and spam versus nonspam as a classification example.
What you can do after
Apply binary cross-entropy to train click and purchase predictors, then compare results with online metrics such as CTR and conversion rate.
How it connects
Connects binary cross-entropy with focal loss, class imbalance, and the distinction between training loss and business metrics.

Also explained in

Compare how 19 books explain cross entropy loss →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning System Design. The section links point to the parts of the book it draws on.