1
$\begingroup$

I am currently doing a master's in applied mathematics, and I recently got interested in machine learning and artificial intelligence, and I am thinking of going for a Ph.D. in this area. I have a reasonable maths and stats background, but I haven't done any course in ML/AI. Next semester, I am thinking of doing courses in ML (uses the book by Bishop), AI (uses the book by Norvig) and reinforcement learning at my university. Another advanced course in C++ is being offered, which I am also very interested to take, but the problem is it will be very difficult to manage all of these courses together. I have some knowledge of C++ (built some parts of a reasonably big project in the past but got a bit rusty nowadays) and very basic knowledge of Python, though I find Python much easier to learn and use than C++.

So, my question is: how important is C++ if I go for a Ph.D. in ML/AI/CV/NLP, etc.? Should I bother taking the C++ course or be more focused on Python and do the other three courses i.e., ML, AI, and reinforcement learning?

$\endgroup$
7
  • 1
    $\begingroup$ Most real machine learning is done on the GPU, so using python and C++ shouldn't offer that much of a difference in what you can achieve, it would mostly just be that python is 10x easier to use. For example, a lot of the state of the art in machine learning is written using python libraries that handle the complicated GPU stuff for you. There's arguments to be made for C++, but in regards to machine learning, I really don't think it has a place. Python is just better in almost every way IMO $\endgroup$
    – Recessive
    Jul 9 at 4:00
  • 1
    $\begingroup$ I learnt all I know through playing around with projects and reading disjointed resources online, so I'm afraid I don't know. However, I can point you towards the Stanford lectures on Youtube (cs231n). They're free and very good. A bit complex if you're just starting, but very informative $\endgroup$
    – Recessive
    Jul 9 at 6:42
  • 1
    $\begingroup$ Consider also generating C (or C++) code -it could be compiled into a plugin- (see this answer...), and combining existing libraries. We aim to do so in RefPerSys $\endgroup$ Jul 11 at 21:04
  • 1
    $\begingroup$ Learn also several programming languages. For example, Scheme (with SICP...) or Prolog. And read the Dragon book to understand how programming languages get implemented. See also Pitrat's blog. Feel free to contact me by email to basile@starynkevitch.net $\endgroup$ Jul 11 at 21:11
  • 1
    $\begingroup$ Consider also reading Pitrat's last book Artificial Beings: the conscience of a conscious machine $\endgroup$ Jul 12 at 6:21
3
$\begingroup$

Of course, whether or not you will need to know and use C++ depends on the topics you will research during your Ph.D. or job. If you'll need just to use and/or combine some existing ML models (yes, in a Ph.D., you're expected to come up with new ideas/tools), then you won't probably need to know C++, as the most commonly used libraries for machine learning nowadays, such as TensorFlow, Keras, or PyTorch, have their main APIs written in Python (but there are also APIs written in other languages, but they are not typically as mature as the Python ones), although the core of these libraries is or can be written in C++, but you may never need to have to look at the core of these libraries.

I can say that I also know C++ (of course, not everything or every detail and library, and, of course, my knowledge of it also becomes rusty if I don't use it for a long time), but I rarely need to use my knowledge of C++ to do research in ML or AI (which is what I am currently doing), but, again, it all depends on the topic of your Ph.D. For example, if you wanted to contribute to the progress of OpenCog or if your Ph.D. involved an efficient implementation of some algorithm or data structure, then it may be a good idea to know C++, C, or a programming language like Rust.

$\endgroup$
2
$\begingroup$

In my experience, knowledge of any particular programming language does not matter. What matters is that you can quickly pick up the basics of a given language.

In my professional work I have been programming in Scala, Java, Groovy, and now Lisp; I didn't really know any of these languages before my working with them (except for Java). But I have been able to pick up a working knowledge in them due to general familiarity with programming (I have been programming in a variety of languages for the past 35 years).

I would assume that knowledge of a specific language becomes relevant if you are acctually working on the tools themselves, where advanced proficiency would be required. For applications using existing libraries this is generally not necessary. As long as you can work with the language, and are able to diagnose why something didn't work, then you should be fine.

Programming concepts are in my view far more important than a specific language.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.