5 ms·
Gradient descent is a pretty common algorithm, and I've seen it implemented in everything from JavaScript to c++. I have to say in this case the notation is sig
by discmonkey 5y ago
Gradient descent is a pretty common algorithm, and I've seen it implemented in everything from JavaScript to c++. I have to say in this case the notation is significantly more distracting than helpful imo. Or to put it another way, the set of people working in the ml field, is both larger and more diverse than the set of people working purely in math. Everyone in the population of people who can both program and understand this type of notation would also be able to understand the less terse but more readable utf8 based text, the inverse is not true.
- generalizations 5y agoI think that means this code in particular is not catering to the lowest common denominator of people using the algorithm, but is instead aimed to be easy to use by those already fluent in the domain. It's important for both types of implementations to exist, and as you say, there's lots of other implementations available for those not familiar with the mathematical notation.
- deeviant 5y agoIs it easier to use? Or just it just look pretty to a subset of people?
- generalizations 5y agoIt's easier. There's a reason we use 'y = mx + b' instead of 'range = slope * domain + intercept' when we're doing math calculations. It's nice to use the long form when we're learning what the symbols are, but the symbols enhance readability when you're doing math, once you've become familiar with the meaning of the terms.
- didibus 5y agoI'd be tempted to challenge this assertion. It made sense when handwriting to maximize for not having to spend too much time writing, but with modern auto-complete, I might start to believe that it be clearer to use the long form for everyone, yes even for a person familiar with mathematics. If all math was rewritten long form, I feel it would honestly have second order effect on approachability and being able to understand papers even from other mathematicians.
- patrick451 5y agoHard disagree. Just reading 'range = slope * domain + intercept' is tedious and takes 10 times as long.
- deeviant 5y agoHard disagree. Because tedious and long is absolutely orthogonal to "easier to understand". There is a reason why one letter/number variables are basically verboten in best practice.
- jstx1 5y ago> I think that means this code in particular is not catering to the lowest common denominator of people using the algorithm Maybe the title should have been 'Algorithms that look concise and beautiful to people who already know them'.
- TheTrotters 5y agoAnyone who has even basic fluency with these algorithms has ~never worked with code that uses these symbols and will likely find them distracting in this context. I've seen plenty of function use, say, `theta` but I have never worked with θ.
- icedistilled 5y ago>is not catering to the lowest common denominator of people using the algorithm I don't think an expert in some field who just happens not to be an expert in some other field's jargon and pictographs should be branded "a lowest common denominator of people", this terminology is both judgmental and elitist in all the bad ways.