when transforming data to log scale for charting purposes, is it more "correct" in some way to always transform using log(x+1)
(henceforth referred to as log1p
following numpy/python convention) than with log(x)
and does it break any common user expectations?
I understand that log(x+1)
will have better numerical stability if the numbers are close to 0, for instance if they are say a loss metric in DL. in such cases log1p could be a better choice.
which of these design choices are more valid?
- always use log1p to compute the transformation
- use some heuristic to select between log1p and log depending on the name of the metric and/or the range of values (how close to 0 the values get)
- put the burden on the user to select between log1p and log (I've never seen any code-free software do that)