3 ms·
Although understanding floating point is important, it is often ignored in Data Science schools. The title reminds me a friend of mine who attends a data scien
by kbumsik 8y ago
Although understanding floating point is important, it is often ignored in Data Science schools.
The title reminds me a friend of mine who attends a data science master course without computer background. He asked me for help for his numpy homework on Bayesian Probability theory. The number he got was so small that he got weird result. I immedieatly thought it was because float64 couldn't cover that number so I told him to use longdouble dtype (it's 80 bits in Intel I think) and the problem solved.
Later he told me even the professor didn't expect such case when announcing the homework and many students couldn't finish the hw on time because of this.
- de_watcher 8y agoThat's a difficulty that exists for the simulations, optimization problems and various algorithms. Some need so many bits that they don't work at all.
- gronne 8y agoNo such thing as “Data science” - just a fancy term for trade school computer skills. Thats why.
- wolfgke 8y ago> No such thing as “Data science” - just a fancy term for trade school computer skills. Thats why. Relevant xkcd: https://xkcd.com/435/ https://xkcd.com/435/ Or as my friend put it: everything is just a trivial special case of either mathematics or physics. ;-)
- gronne 8y agoTrue :) I know the strip. tbh I just felt like trolling the insecure “data hackers” crowd. Looking at downvotes: I think it worked.
- everybodyknows 8y agoFun xkcd, but mathematics does not belong on a continuum of the scientific disciplines, all of which seek to describe nature. "Die ganzen Zahlen hat der liebe Gott gemacht, alles andere ist Menschenwerk" https://en.m.wikipedia.org/wiki/Leopold_Kronecker https://en.m.wikipedia.org/wiki/Leopold_Kronecker Verbose, highly literal translation: "Loving God created the absolute integers; all else is the work of humanity."
- mehrdadn 8y agoWould the log-sum-exp trick have helped by any chance? https://en.wikipedia.org/wiki/LogSumExp https://en.wikipedia.org/wiki/LogSumExp
- kbumsik 8y agoI didn't know this (I'm not in ML/Data Science) but that looks very helpful. I looked through his learning materials but I have never seen this one though.
- mehrdadn 8y agoYeah I only happened to know because of ancourse I took that taught some ML. I mentioned it because, later on, I even came across a situation where it would've been directly applicable, but for some reason the thought that it might solve the problem escaped me at that moment, so I asked and someone else had to remind me of that fact... so I feel it's probably not the easiest thing to recognize when it's happening.
- Veedrac 8y ago> I immedieatly thought it was because float64 couldn't cover that number so I told him to use longdouble dtype (it's 80 bits in Intel I think) and the problem solved. This is a very dangerous habit. If 64 bits isn't enough you are generally using the wrong representation.