Lurker News
How should a software engineer with no machine learning background get started on the subject? Do you think that getting started by learning a framework like TensorFlow is a good idea or should I gain a background knowledge first?

Comments (125) 56 threads

Earlier comments
laichzeit02 replies#
You should have the equivalent of an undergraduate degree in mathematical statistics (calculus, linear algebra, et al). It should take about 4 years of full time study to achieve that.

Forget about the code part. It's the least difficult part.

rayalez2 replies#
I think that this is a horribly impractical advice, and I keep seeing it everywhere.

With modern tools and frameworks you can start learning and applying what you know on practice almost immediately.
Check out Keras and the book "Deep Learning with Python"[1]. They have enabled me to train my first ANN in 2 days, and get to the point of building a MNIST recognizer in a month(and I was reading it pretty slowly).
Sure, if you're coding it from scratch and must understand every signle detail, you do need like 10 years and 3 PhD's. But that's not a wise way to learn.
I recommend to take the simplest tools, and apply them to practical projects immediately. That will give you the general overview of how things work, and then you will learn the details as needed.
[1] https://machinelearningmastery.com/deep-learning-with-python...

nkozyra#
If you don't understand how it works your won't understand how to optimize things, how to do error analysis, how to implement better features and weights out of the box, how to choose the right algorithm from the start, how to do good cross validation ...

Yes, you can take a library and implement it in 10 minutes, but then you're really not learning machine learning, are you?
I will argue you do not need four years of math by any stretch, though. The stumbling block will be notation more than anything else. Relatively basic calculus and linear algebra will suffice.
They were right about one thing: the code is the least important part.

home_boi#
In practicality the OP is right. You won't be on the same level as people with a PhD in a corporate or applied setting. The hardest parts are feature engineering, researching and statistical analysis (presenting research to team). It's hard to gain all those skills without years of experience researching in an academic setting.

As an undergrad, I was doing all those easy ML tutorials and took an undergrad level ML course. I thought I would be useful in actual practice, but knowing the whats/hows of neural nets/clustering/etc. is not enough. Feature engineering/math is the most difficult part. In a corporate setting, if it was a straight forward solution, you wouldn't be doing that work because the solution would be trivial and already implemented.
As an engineer with only a bachelors on a ML team full of PhDs there is a definite difference in skill. I've been reduced to a monkey (a content one) that works on the data pipeline. Learning to deal with real world ML problems would take me years of work that I am not sure I would be willing to do, especially when the pay increases per effort expended learning ML is much lower than with regular software/distributed systems/etc..
On the interest part, you're right that I would never have tried to learn ML if I had known the amount of work that is required to actually be good or if I tried learning the math first. That's the real world though. The useful ML engineers did learn the math. The efficient way to learn ML is to learn the math/statistics first.

atemerev#
It takes four years of full time study to gain universal foundations to approach many different problem types.

For special applications, it is totally OK to learn as you go.

1_over_n#
IMO the best way to get started (like with anything) is by getting started. I think the way you make progress is going to come down to you personally as an individual and what your motivations are. Before learning ANYTHING new i would invest some time in learning how to learn. There is a good coursera course on this https://www.coursera.org/learn/learning-how-to-learn and the book by the course authors is incredibly useful for putting a framework with some techniques that can help the approach to learning any new skill. This is not meant to be condescending advice but for me personally it's changed the way i go about learning any new skill now.

I think as well it really depends where you are coming from / what your background is. The reason i say this is i have recently gone through a similar transition into machine learning 'from scratch' except once i got there i realised i knew more than i thought. My academic background is in psychology / biomedical science which involved a LOT of statistics. From my perspective once i started getting into the field i realised there are a lot of things i already knew from stats with different terms in ML. It was also quite inspiring to see many of the eminent ML guys have backgrounds in Psychology (for instance Hinton) meaning i felt perhaps a bit more of an advantage on the theoretical side that many of my programming peers don't have.
I realise most people entering the field right now have a programming background so will be coming at things from an opposite angle. For me i find understanding the vast majority of the tests and data manipulation pretty standard undergraduate stuff (using python / SK Learn is incredible because the library does so much of the heavy lifting for you!). Where i have been struggling is in things that an average programmer probably finds very basic - it took me 3 days to get my development environment set up before i could even start coding (solved by Anaconda - great tool and lessons learned). Iterating over dictionaries = an nightmare for me (at first anyway, again getting better).
I think (though i may be biased) it's easier to go from programming to ML rather than the other way around because so much of ML is contingent on having decent programming skills. If you have a decent programming skill set you can almost 'avoid' the math component in a sense due to the libraries available and support online. There are some real pluses to ML compared to traditional statistics - i.e. tests that are normally ran in stats to check you are able to apply the test (i.e. shape of the data: skewness / kurtosis, multicollinearity etc) become less of an issue as the algorythms role is to deliver an output given the input.
I would still recommend some reading into the stats side of things to get a sense of how data can be manipulated to give different results because i think this will give you a more intuitive feel for parameter tuning.
This book does not look very relevant but it's actually a really useful introduction to thinking about data and where the numbers we hear about actually come from
https://www.amazon.co.uk/Risk-Savvy-Make-Good-Decisions/dp/1...
In conclusion if you can programme and have a good attitude towards learning and are diligent with efforts I think this should be a simple transition for you.

neelkadia#
Thanks!
dlo#
Contrary to the other advice around here, I would strongly advise NOT taking a course. I think it is a good idea at some point, but it is not the first thing you should be doing.

The very first thing you should do is play! Identify a dataset you are interested in and get the entire machine learning pipeline up and running for it. Here's how I would go about it.
1) Get Jupyter up and running. You don't really need to do much to set it up. Just grab a Docker image.
2) Choose a dataset.
I wouldn't collect my own data first thing. I would just choose something that's already out there. You don't want to be bogged down by having to wrangle data into the format you need while learning NumPy and Pandas at the same time. You can find some interesting datasets here:
http://scikit-learn.org/stable/datasets/
And don't go with a neural net first thing, even though it is currently in vogue. It requires a lot of tuning before it actually works. Go with a gradient-boosted tree. It works well enough out of the box.
3) Write a classifier for it. Set up the entire supervised machine learning pipeline. Become familiar with feature extraction, feature importance, feature selection, dimensionality reduction, model selection, hyperparameter tuning using grid search, cross-validation, ....
For this step, let scikit-learn be your guide. It has terrific tutorials, and the documentation is a better educational resource than beginning coursework.
http://scikit-learn.org/stable/tutorial/
4) Now you've built out the supervised machine learning pipeline all the way through! At this point, you should just play:
4a) Experiment with different models: Bayes' nets, random forests, ensembling, hidden Markov models, and even unsupervised learning models such as Guassian mixture models and clustering. The scikit-learn documentation is your guide.
4b) Let your emerging skills loose on several datasets. Experiment with audio and image data so you can learn about a variety of different features, such as spectrograms and MFCCs. Collect your own data!
4c) Along the way, become familiar with the SciPy stack, in particular, NumPy, Pandas, SciPy itself, and Matplotlib.
5) Once you've gained a bit of confidence, look into convolutional and recurrent neural nets. Don't reach for TensorFlow. Use Keras instead. It is an abstraction layer that makes things a bit easier, and you can actually swap out Tensorflow for Theano.
6) Once you feel that you're ready to learn more of the theory, then go ahead and take coursework, such Andrew Ng's course on Coursera. Once you've gone through that course, you can go through the course as it actually has been offered at Stanford here (it's more rigorous and more difficult):
https://see.stanford.edu/Course/CS229
I will also throw in an endorsement for Cal's introductory AI course, which I think is of exceptionally high quality. A great deal of care was put into preparing it.
http://ai.berkeley.edu/home.html
There are other good resources that are more applied, such as:
http://machinelearningmastery.com/
I hope this helps. What I am trying to impart is that you will understand and retain coursework material better if you've already got experience, or better yet, projects in progress that are related to your coursework. You don't need to undergo the extensive preparation that is being proposed elsewhere before you can start PLAYING.

Load more comments