I am log scaling my whole dataset in log base 10. When I do this I get -infitity for the minimum value.

I am wondering how I can get rid of this -infinity?

I have been advised to add a small value number inside the log to get rid of this like:

log10(dataset + 0.01)

This does get rid of the -infinity but I'm unsure does this skew the data or is it the wrong thing to do?

Also,if this is the right method, does anyone have any tips on how to decide what number to use e.g. 0.01, 0.1, or 0.001?


1 Answer 1


I would recommend taking a look at the transformation you did: enter image description here

Consider whether you would want to add a really small number like 0.0000001 to zero before taking the log. Probably not, as you will get a large negative number. However, there should be little to no difference in results once you start adding large enough numbers like 0.1. I would recommend trying each and looking at a density plot of the resulting data. Investigate which distribution looks the least skewed and go with it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.