by leeoniya · 2y ago · 0 comments
https://leeoniya.github.io/uPlot/demos/arcsinh-scales.html
cube root: https://en.wikipedia.org/wiki/Cube_root#/media/File:Cube-roo...
vs arcsinh: https://upload.wikimedia.org/wikipedia/commons/9/92/Inverse_...
some interactive log scale demos:
you can always y-flip the result of log(abs(value)) and show neg ticks on the axis, but it will not be a nicely-continuous, single scale that can cross 0.
https://stackoverflow.com/questions/3305865/what-is-the-diff...
https://matplotlib.org/stable/gallery/scales/symlog_demo.htm...
for an example.
how does this actually work? afaik, there is no log() fn that you can run which "becomes linear". i guess you can wrap a call to log() in another fn that simply does linear scaling below the defined threshold, but it's not a smooth transition without a bunch of extra [possibly slow] smoothing code.
what you're describing is exactly how a straight call to Math.asinh() behaves, and what i have implemented in the above demo.
It's a great transformation for data viz or machine learning / statistical modeling, but its not really obvious what an IHS-transformed variable represents.
once you see the shape plotted, i dont think it's much harder than understanding the shape of logistic functions, which have similar formulations, and are used all over the place in ai/ml for activation, etc.
https://win-vector.com/2012/03/01/modeling-trick-the-signed-...
https://marcfbellemare.com/wordpress/12856
https://worthwhile.typepad.com/worthwhile_canadian_initi/201...
https://www.nber.org/system/files/working_papers/w29998/w299...
https://blogs.worldbank.org/en/impactevaluations/interpretin...
https://academic.oup.com/ectj/article-abstract/24/2/334/5948...
https://marcfbellemare.com/wordpress/wp-content/uploads/2019...
There are even wilder triple hyperbolic scales on three dimensions.