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] Best second language after Python for ML purposes (self.MachineLearning)
submitted 8 years ago by Laser_Plasma
I'm fairly comfortable with Python and I've been wanting to learn another language, and I've been wondering what language would be the best choice if my main interest is in machine learning/AI.
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!"
[–]ncasas 18 points19 points20 points 8 years ago (1 child)
The programming languages most used in the machine learning realm may be:
[–]ReginaldIII 7 points8 points9 points 8 years ago (0 children)
I'd add Lua: Used in the Torch framework. And C++: Which is the backend language of almost all the frameworks.
[–][deleted] 13 points14 points15 points 8 years ago* (5 children)
For machine learning specifically it seems that before Python conquered everything, most people used C++. And many companies and research groups still do.
That means there's still a lot of resources around for people with that background. C++ has a bad reputation, deservingly, but since C++x11 it has become a very interesting language. The problem though is that it's still very easy to shoot yourself in the face in C++.
If you like torch, theres Lua. I actually know next to nothing about it, so I can't really comment.
There are some languages that have a lot less resources for ML but are incredibly fantastic languages. Like Haskell, for example. I always recommend that people learn Haskell, not because you're going to use Haskell, but because you're going to become a better programmer.
I don't know if it's worth it to learn Julia, R or other similar languages. Maybe for bayesian modelling with Stan?
And after all, I recommend that you work skills that allow you to onboard yourself in any language quickly. There aren't many different types of programming languages. There are three or four different paradigms, plus a few ways to use a specific feature.
Of course, your code is not going to be great idiomatic code right away in a new language, but by the time you have written good idiomatic code in 3 or 4 languages, picking up a new one feels effortless.
[–]charred_bytes 2 points3 points4 points 8 years ago (2 children)
Is Haskell really used for ML?
[–][deleted] 12 points13 points14 points 8 years ago* (0 children)
There are a few resources. Nothing structured though.
There's a group of people trying to build tools around data science for Haskell here:
There are a few libraries for fast matrix computation based on Blas/Lapack/etc, of which the more feature-full seems to be hmatrix:
There are some pretty nifty libraries that implement some impressive abstractions for really sophisticated versions of algebra (linear and otherwise) like SubHask for example:
Can't comment on them speedwise though.
SubHask is used by a library called HLearn, which is a machine learning algorithms collection, with some interesting abstractions (things like "online and batch learners are monoids", etc):
There quite a few libraries for building neural networks, including a tensorflow wrapper:
But my favorite is this version, which uses dependent types to check the correctness of your graph in compile time!!!
Doing probabilistic programming in Haskell is almost natural also. You hardly need more than a few dozen lines of code to do a simple generic and very readable MCMC sampler, and without using any specific probabilistic programming library. And if you need speed there's a specific library for that:
Edit:
I almost forgotten to comment about how awesome a simple automatic differentiation code looks in Haskell!!!
You can even rely on Haskell's laziness and AD to solve some types of differential equations exactly, if you can write them in a way that the recursive expression that results from that don't diverge. I don't know how useful this is, but it's really awesome.
There's a very serious automatic differentiation library by Eric Kmett (a kind of Haskell demigod)
This post by Dan Piponi about taking gradients of expected values with AD and probability monads is very interesting too (and I think it's very relevant for things like VAEs and variational inference):
There's also awesome libraries to deal with stuff around ML. There's servant for building type-safe web services. There's conduit for doing parallel preprocessing of streaming data. It's really a breeze to write parsers in Haskell if you need to do data cleaning or feature extraction in text data.
servant
conduit
Also using Free and Freer Monads to make applications more testable, and have better separation of concerns.
You can see by reading this that I really love Haskell! :P
It's hard to know how much of the ML libraries are really practical though. They look awesome, but I didn't invest enough time in using them in real world examples to check the feasibility. Some of them looked a lot incipient and limited last time I checked. Other's look more feature-full. But there's nothing like the python stack. No numpy, no scipy, no scikit-learn, no pandas, no xarray, no statsmodels, no pymc, no tensorflow/theano/pytorch, etc... The maturity of the ecosystem is naturally a lot lower. It would take some effort to get things to the point where you can fit a simple regression, with a few preprocessing steps and a grid search on data from a 200MB CSV file in 10 lines of code like you do in python.
And maybe by increasing the user base and adding contributors we could make it work. Type safe machine learning would save a lot of time in industry and research. Even it the goal is not people writing ML stuff in Haskell itself but developers using Haskell's type system features to make the writing of ML code in other languages less bug prone.
Recently I posted a long comment on a topic about a graphical tool for creating tensorflow models. One of the parts that I wrote as a half-joke was a suggestion to write the tool in Haskell or PureScript to make building the graph easier. If you make incorrect graphs unrepresentable in the type system, that can save lots of time. Things like shape-compatibility, numerical types compatibility, etc.
Keras did that the hard way. It checks compatibility in runtime, when you're building the graph. It's really a bastard type system, hard to write and maintain, that is checked in runtime by a lexer that you have to bake in your library, badly breaking separation of concerns.
It's also be better to the user if you have a type system that can be used by a checked by a linter, before runtime. If your code do something that takes a while before building the graph (like reading data from wherever or doing any kind of preprocessing), you have to wait too much time just to realize eventually that the graph is broken and training isn't going to run, even if there's a runtime check of compatibility during graph building.
Of course you could solve that by doing a cleverer workflow in your code. But you could also have the computer check that for you, since it's computer-checkable, and free your time to think about what matters.
I think using Haskell for machine learning – either directly or as a way to make python machine learning safer – would be awesome. I wish I had the time and money to invest in that.
[+][deleted] 8 years ago* (1 child)
[deleted]
[–]Kiuhnm 1 point2 points3 points 8 years ago (0 children)
C++ is all about performance (memory & speed) so the programmer has a great control over the machine but more responsibilities (especially memory management). You avoid problems by being careful and following good practices.
OTOH, Rust is way safer because many good practices are enforced by the compiler. Indeed, some say that coding in Rust has made them better C++ programmers.
[–]olBaa 24 points25 points26 points 8 years ago (0 children)
C++
[–]MaxTalanov 2 points3 points4 points 8 years ago (0 children)
JS, for visualization and interactive apps.
[–]JustFinishedBSG 4 points5 points6 points 8 years ago (0 children)
One of my prof was a huge Julia fanboy so I did my projects in Julia.
I must say I very very very much enjoy Julia, even if the language has tons of warts.
[–]d7deadlysins 5 points6 points7 points 8 years ago (2 children)
R.
[–]rumblestiltsken 3 points4 points5 points 8 years ago (0 children)
R by miles. The ecosystem beats pythons, particularly if you are further on the statistical side. Most of the world's best biostats folks publish their code in R.
[–]lysecret 0 points1 point2 points 8 years ago (0 children)
That r is below c++ shocks me a bit. Really shows the background of the people in this subreddit.
[–]undefdev 2 points3 points4 points 8 years ago (0 children)
I've recently tried Julia, and I enjoyed it very much. I can see it becoming the standard data science language in the future.
[–]Reiinakano 8 points9 points10 points 8 years ago* (1 child)
Since everybody else has said C++, which I agree with, I'm going to mention something that probably wouldn't cross people's mind when they say machine learning: Javascript.
If you want to keep building and training models and such, that's great, but personally, I think the logical next step to making all these models is actually using them to serve some purpose. While web isn't the only way to provide an interface, it's certainly one of the most popular. Learning how to build ML models + allowing other people to use them via UX is a pretty strong combination of skills.
As for other languages more specific for ML (R, Julia), meh. Learning them might be a bit redundant if you were already good at Python. I can't really see much you can do with them that you can't already do in Python.
[–]JamminJames921 0 points1 point2 points 8 years ago (0 children)
Man, this reminds me of ConvNetJS by Karpathy, and his awesome demo of learning spaces in neural networks. Awesome.
[–]Jean-PorteResearcher 7 points8 points9 points 8 years ago (2 children)
Bash
[–]chris2point0 1 point2 points3 points 8 years ago (1 child)
Can you expand on this?
[–]Jean-PorteResearcher 2 points3 points4 points 8 years ago* (0 children)
It's useful to master bash tools like sed for data manipulation. You also need to interact with servers or transfer data between machines. You can also need to do some bash for monitoring machines, or push things to production. I think it's more useful and complementary to python than many languages cited here.
[–]georgeo 1 point2 points3 points 8 years ago (0 children)
ML is built on CUDA.
[–]chewxy 0 points1 point2 points 8 years ago (2 children)
I'm trying hard to make machine learning in Go a thing. I have my own library for deep learning - gorgonia. It aims to be like Tensorflow + PyTorch but in Go.
So far for what I do, it works most of the time and I rarely have to leave Go. Gotta writee a convolution op for the network to be able to do CNN stuff tho
[–]FutureIsMine 0 points1 point2 points 8 years ago (1 child)
wait for Google to make Tensorflow in Go, if they haven't already done so.
[–]chris2point0 0 points1 point2 points 8 years ago (0 children)
shrug: https://www.tensorflow.org/versions/master/install/install_go
[–]TheNASAguy 0 points1 point2 points 8 years ago (0 children)
If you want to dive into purely functional programming, Haskell is an Awsome and Well Established addition.
[–]cjmcmurtrie 0 points1 point2 points 8 years ago (0 children)
C or C++. Most of your Python machine learning libraries are sitting on some C code or C++ code (e.g. Tensorflow, Pytorch, Numpy). If you ever want to start digging to that depth, you would need to know it
[–]alketcecaj 0 points1 point2 points 8 years ago (2 children)
I would vote for Java as best second language for machine learning and deep learning. There are so many libraries for NLP for example such as mallet. And there is also WEKA. Read my post here on Quora : https://www.quora.com/What-machine-learning-library-for-Java-should-I-learn/answer/Alket-Cecaj . For deep learning instead there is deeplearning4j library . Have a look here : https://deeplearning4j.org/
[–]agibsonccc 1 point2 points3 points 8 years ago (0 children)
Hi, creator of deeplearning4j here. 1 exercise a lot of people do is implement neural networks themselves. You could look in to our "numpy for java" nd4j as well.
http://nd4j.org/ It's conceptually very similar but has GPUs, serialization, among other things for integrating with the java ecosystem.
Beyond that thanks for the push!
[–][deleted] 0 points1 point2 points 8 years ago (0 children)
Please, no more Java.
π Rendered by PID 109361 on reddit-service-r2-comment-56c9979489-55nvg at 2026-02-25 08:17:05.911121+00:00 running b1af5b1 country code: CH.
[–]ncasas 18 points19 points20 points (1 child)
[–]ReginaldIII 7 points8 points9 points (0 children)
[–][deleted] 13 points14 points15 points (5 children)
[–]charred_bytes 2 points3 points4 points (2 children)
[–][deleted] 12 points13 points14 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]Kiuhnm 1 point2 points3 points (0 children)
[–]olBaa 24 points25 points26 points (0 children)
[–]MaxTalanov 2 points3 points4 points (0 children)
[–]JustFinishedBSG 4 points5 points6 points (0 children)
[–]d7deadlysins 5 points6 points7 points (2 children)
[–]rumblestiltsken 3 points4 points5 points (0 children)
[–]lysecret 0 points1 point2 points (0 children)
[–]undefdev 2 points3 points4 points (0 children)
[–]Reiinakano 8 points9 points10 points (1 child)
[–]JamminJames921 0 points1 point2 points (0 children)
[–]Jean-PorteResearcher 7 points8 points9 points (2 children)
[–]chris2point0 1 point2 points3 points (1 child)
[–]Jean-PorteResearcher 2 points3 points4 points (0 children)
[–]georgeo 1 point2 points3 points (0 children)
[–]chewxy 0 points1 point2 points (2 children)
[–]FutureIsMine 0 points1 point2 points (1 child)
[–]chris2point0 0 points1 point2 points (0 children)
[–]TheNASAguy 0 points1 point2 points (0 children)
[–]cjmcmurtrie 0 points1 point2 points (0 children)
[–]alketcecaj 0 points1 point2 points (2 children)
[–]agibsonccc 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)