I decided to solve FizzBuzz like a mathematician would aka the most obnoxious way I could imagine. This is my gift to you.https://gist.github.com/Gorcenski/f03c834696cb94768561283cfb9b82b2 …
-
-
Hot take: FizzBuzz is a perfectly suitable test problem for when you’re want to test a new configuration and need a non-trivial but simple exercise to ensure things like imports, outputs, args, etc are working. It’s still shit for interviews
Show this thread -
It’s easy to test against, it pretty quickly shows if you have e.g. a configuration issue, and creative solutions are good mental exercises in otherwise tedious work
Show this thread -
But what’s relevant here is that there are a few concepts that are used widely in data science and it brings them from an abstract notion to something concrete. In this case, cyclic behavior has a natural relation to polynomials and to 1D vector convolutions.
Show this thread -
1-D convolutions neural networks use such convolutions, and they’re being used for text process and other applications where recurrent neural nets have found some success. The underlying relations become a little more clear when you see it in this light.
Show this thread -
And if you take it a step further and recognize that discrete convolutions are related to joint probability distribution functions, then all of a sudden the probabilistic nature of how neural networks work emerges like truth from the well.
Show this thread
End of conversation
New conversation -
-
-
You derived a polynomial to replace the ifs one might more traditionally use? Nice. I was kindof expecting an obfuscating transpiler...
-
I started from the fact that the problem is merely the fundamental theorem of finite abelian groups and then used the isomorphism to roots of unity, which manifests as polynomials, which I multiply by applying 1D finite convolutions
-
Thank you. /me queues up some reading
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.