Why is MSLE unsuitable without modification for a target that naturally takes negative values?
Classic MLLevel: IntermediateLogarithmic error domain
Why is MSLE unsuitable without modification for a target that naturally takes negative values?
Hints
- Check the metric's accepted domain.
- A numerical workaround can alter the objective.
Answer
sklearn's MSLE assumes nonnegative targets and predictions and compares log1p values. Arbitrary shifting changes the metric's meaning; select a loss matching the target domain.
Source and licence: scikit-learn 1.7.2 — model evaluation · BSD-3-Clause · answer: Quantoros editorial