How to Evaluate the Logistic Loss and not NaN trying

Category: coding
#logistic regression #numerical stability

By Fabian Pedregosa and Bart van Merriënboer.

A naive implementation of the logistic regression loss can results in numerical indeterminacy even for moderate values. This post takes a closer look into the source of these instabilities and discusses more robust Python implementations.