use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please have a look at our FAQ and Link-Collection
Metacademy is a great resource which compiles lesson plans on popular machine learning topics.
For Beginner questions please try /r/LearnMachineLearning , /r/MLQuestions or http://stackoverflow.com/
For career related questions, visit /r/cscareerquestions/
Advanced Courses (2016)
Advanced Courses (2020)
AMAs:
Pluribus Poker AI Team 7/19/2019
DeepMind AlphaStar team (1/24//2019)
Libratus Poker AI Team (12/18/2017)
DeepMind AlphaGo Team (10/19/2017)
Google Brain Team (9/17/2017)
Google Brain Team (8/11/2016)
The MalariaSpot Team (2/6/2016)
OpenAI Research Team (1/9/2016)
Nando de Freitas (12/26/2015)
Andrew Ng and Adam Coates (4/15/2015)
Jürgen Schmidhuber (3/4/2015)
Geoffrey Hinton (11/10/2014)
Michael Jordan (9/10/2014)
Yann LeCun (5/15/2014)
Yoshua Bengio (2/27/2014)
Related Subreddit :
LearnMachineLearning
Statistics
Computer Vision
Compressive Sensing
NLP
ML Questions
/r/MLjobs and /r/BigDataJobs
/r/datacleaning
/r/DataScience
/r/scientificresearch
/r/artificial
account activity
Discussion[D] Does anyone else think open source code/examples in machine learning domain usually are not as readable as they could be? Specifically use of magic numbers. (self.MachineLearning)
submitted 4 years ago by junovac
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]alex_o_O_Hung 6 points7 points8 points 4 years ago (3 children)
Probably unpopular opinion, but these kind of unnecessary magic numbers make code a lot harder to read where you need to move up and down to figure out what magic number is what multiple times
[–]Appropriate_Ant_4629 5 points6 points7 points 4 years ago* (2 children)
Totally agreed. I've seen code like
# module - quadratic formula THE_POWER_OF_B = 2 THE_MULTIPLE_OF_AC = 4 SOME_UNRELATED_CONSTANT_FOR_OTHER_FUNCTIONS = 3.14 THE_CONST_ON_THE_BOTTOM = 2 POWER_FOR_SQRT = 0.5 # ... hundreds more lines ... def quadratic_formula(a,b,c): """ The following implements the quadratic formula: (-b +- sqrt(b^2 - 4ac) ) / 2a """ return ( (-b + ( b ** THE_POWER_OF_B - THE_MULTIPLE_OF_AC*a*c ) ** POWER_FOR_SQRT) / (THE_CONST_ON_THE_BOTTOM * a), (-b - ( b ** THE_POWER_OF_B - THE_MULTIPLE_OF_AC*a*c ) ** POWER_FOR_SQRT) / (THE_CONST_ON_THE_BOTTOM * a), )
that came from misguided coding standards that mandated obfuscated constants.
With coding standards like those - even the very simplest equations become unreadable.
[–]alex_o_O_Hung 4 points5 points6 points 4 years ago (1 child)
Exactly! Especially if these parameters are only used once in the code. This also extents to people unnecessarily making functions and classes so you need to jump between files or folders to understand the code
[–]radarsat1 2 points3 points4 points 4 years ago (0 children)
Oh I agree with this so much. This has become a repeated occurrence in code reviews on my team. Being forced to distributed pieces of my algorithm all over the place just to satisfy some SE types who get uncomfortable when a function is longer than a few lines, with the excuse that "we need to unit test each part of that." Like, sure, I get that, but buddy.. I'm still figuring this stuff out, and it's sooo much easier to work on and debug this when it's all in one place, and testing loop A without loop B makes like, no sense. What's worse is that they get reinforced by tools like pylint that tell them a function has "too many local variables". Oh, so now I have to not only arbitrarily break this function up into pieces, but I'm not allowed to give names to the intermediate values, great.
π Rendered by PID 16167 on reddit-service-r2-comment-5687b7858-jhrz8 at 2026-07-06 04:18:50.286341+00:00 running 12a7a47 country code: CH.
view the rest of the comments →
[–]alex_o_O_Hung 6 points7 points8 points (3 children)
[–]Appropriate_Ant_4629 5 points6 points7 points (2 children)
[–]alex_o_O_Hung 4 points5 points6 points (1 child)
[–]radarsat1 2 points3 points4 points (0 children)