Take the Logarithm
by JS
The phrase usually goes: “When in doubt, take the logarithm.” Since this appeared on Twitter recently (can you tell I’m addicted?), I’ve been thinking a little bit about the why behind this little dictum. The shortest reason I can come up with is that logarithms allow you to turn products into sums.
This is incredibly useful if you need to differentiate, integrate, or apply any other kind of linear operation over sums. Also, since logarithms are convex functions, taking the logarithm does not effect the results of convex optimization. Since a lot of data analysis boils down to calculus plus optimization, taking the logarithm is often an extremely useful first step.
Consider yourself informed.
