How to Learn Machine Learning: A Guide for Self-Starters
Machine learning has emerged as one of the hottest technology trends. Salaries for skilled machine learning engineers are through the roof, and many companies are unable to fill open positions in the field. Moving into machine learning, therefore, can be a very promising career move.
But how difficult is it to get a job in machine learning? What skills do you need, and how do you acquire them?
In this post, we develop a learning roadmap for anyone looking to become proficient in machine learning, attempt to answer all the important questions, and discuss the learning resources for self-study that should get you to your first machine learning job.
Here is the process for learning machine learning in a nutshell:
- Take an introductory machine learning course with hands-on practice labs.
Coursera has a range of good machine learning courses, including Andrew Ng’s legendary ML course.
- Build 2-3 pet projects.
Find an open-source dataset online (Kaggle is a great source). Import and preprocess the data, and build a model using the tools and skills you’ve learned in the course. Try to tune the model and improve its performance by manipulating the data and the model hyperparameters.
- Pick an area of specialization.
At this point, you should have a decent basic understanding of machine learning. You probably also have an idea of what area you want to apply machine learning to. Based on your personal interest and goals, I recommend picking an area of specialization and learning the tools and techniques specific to that area.
For example, if you are interested in self-driving cars and robotics, you probably want to focus on deep learning for computer vision.
If you want to focus on natural language processing and language AI, you would also continue your learning journey into deep learning with a focus on sequence models and transformers. In both cases, you need to learn more about neural networks and at least one deep learning framework like TensorFlow or PyTorch.
If, on the other hand, you are more interested in business analytics, you are likely going to focus more on classical methods and statistical techniques such as linear regression.
- Take another online course in your area of specialization.
Nowadays, there are tons of high-quality online courses in various areas of specialization. Coursera, Udemy, and Pluralsight are great places to find courses.
- Build more pet projects of increasing difficulty
For example, if you intend to focus on computer vision, you could start building a vanilla convolutional neural network for classifying images into two classes. The cats and dogs dataset on Kaggle is a great starting point. Next, you can try to build a multiclass classification model and do transfer learning with a more advanced architecture such as ResNet. Lastly, try to build an object detection or image segmentation model or even a generative adversarial network. Generative networks are probably the most difficult to train.
- Read Books and Papers in your area of specialization and create implementations in code.
Courses give you a general introduction to a subject, but they won’t give you the detailed knowledge required to build true expertise. That expertise is mainly built by solving problems you encounter through hands-on practice. To help you find good solutions to those problems and develop best practices, you will have to revert to papers, books, and online discussion forums.
Understanding technical research papers usually requires familiarity with mathematical notation and good foundations in machine learning. If you are able to take a moderately difficult paper and create a working implementation of the algorithm in code, it is a good indication that you have moved beyond the rookie stage. It is also a strong signal to a potential employer that you are able to understand and synthesize information at the cutting edge and derive practical use from it for your employer.
While papers present specific solutions to concrete challenges, I found that books often help develop conceptual knowledge and best practices to address those challenges.
Is it Difficult to Learn Machine Learning?
While machine learning is a difficult subject to learn, most people can succeed with the right learning strategy and a good amount of discipline and patience. How hard your learning journey will be, also depends a great deal on the knowledge and skills you already bring to the table. A strong math background in linear algebra and statistics will go a long way toward a conceptual understanding of machine learning algorithms. Programming experience, especially in Python, will help with practical implementation and understanding of machine learning frameworks.
Can a Beginner Learn Machine Learning?
Even complete beginners can succeed in machine learning. Non-technical people can learn to apply machine learning algorithms without a working knowledge of advanced math. The only real prerequisite to getting started with applied machine learning is programming. If you don’t know how to code, I strongly encourage you to take at least an introductory Python course before starting your machine learning journey.
If you want to read research papers and understand machine learning research, I encourage you to build a foundation in linear algebra, statistics, and possibly calculus.
How long Will it Take to Learn Machine Learning?
An ambitious beginner with no coding background can learn the foundations of programming and applied machine learning in 3-6 months.
If you are an experienced developer, you can probably learn to build simple machine learning models in a few weeks.
Mastering the subject and building the knowledge required of a senior machine learning engineer will take years of dedicated practice and experience.
What do I need to Learn: A Roadmap
Programming skills are a necessity if you want to build any kind of customized machine learning model. That situation might change in the future as no-code ML solutions are cropping up. I still doubt that these tools will ever allow the same kind of customization that programming languages enable.
The go-to language for most machine learning engineers is Python. It is also one of the easiest languages to learn. Whether you don’t have any programming skills to start with or whether you are an experienced developer in another language, picking up Python is definitely a good idea if you are interested in machine learning.
2. Simple Math
Math is often a major obstacle for people who want to break into AI and machine learning. The good news is, that applied machine learning requires significantly less math than research. You should be familiar with vectors and matrices and how to add, subtract and multiply them. Some basic statistics, including random variables, variance, expected values, and normal distributions, should also be part of your toolkit.
3. Machine Learning Foundations and Sci-Kit Learn
Before you learn about specific algorithms, you should build a foundational knowledge of machine learning. This includes an understanding of the different types of machine learning, the bias-variance tradeoff, as well as regularization methods.
The first learning algorithms that most people encounter are linear regression and logistic regression. Understanding how they work really sets the stage for a better understanding of more advanced machine learning algorithms such as neural networks.
SciKit Learn is a Python package mainly used for classical machine learning algorithms and data analysis.
Learn to apply linear and logistic regression in SciKit Learn. Import and analyze some spreadsheet data.
4. Databases and Data Retrieval
Before you can build a model, you need to retrieve the data. In many cases, it won’t be in a folder on a local hard drive.
Often that data will be stuck in a database. Querying relational databases, getting the data you need, combining, and manipulating it with SQL is a skill every machine learning engineer should have.
You may also have to retrieve the data from an online location via API call. Querying APIs and dealing with asynchronous data flows is any other vital skill.
5. Data Preprocessing and Data Pipelines
Most of the data you will encounter in the real world won’t be neatly organized in spreadsheets. One of the most important tasks of a data scientist or machine learning engineer is to bring that data into a form that is suitable for model building. This process is known as data preprocessing.
As a machine learning engineer, you may also be in charge of automating the data preprocessing by building data pipelines. In fact, data retrieval, data processing, and building software to automate the processing of data have become such an important and large component of the data science and AI sector that it has spawned a new role: the data engineer. In some organizations, you may have the luxury of having a data engineer who takes care of data processing for you. But it is still an invaluable skill for any machine learning engineer.
6. Advanced Machine Learning
Now you finally get to actually building and applying machine learning models. At this stage, you may pick an area of specialization.
Business Analytics and Data Mining
For business analytics and data mining (the largest sector), you want to develop broad experience with many statistical and classical machine learning techniques. In recent years, a few methods, such as extreme gradient boosting, have come to dominate classical machine learning methods, but other algorithms such as decision trees or Naive Bayes classifiers are still very valuable.
In this field, data visualization and communication are also especially important. Your job is to gain insights from data and communicate those insights to other people, such as executives and clients. Those people often don’t have a lot of time and want the information to be as easily and intuitively digestible as possible.
If you are interested in using machine learning to build computer vision or language processing applications, you want to focus on deep learning and neural networks.
You start by learning about neural network architectures and how to build them using frameworks like TensorFlow and PyTorch. At this point, it also makes sense to review some calculus and linear algebra because neural networks build on matrices and differential calculus.
For a focus on computer vision, you need to become familiar with convolutional neural networks. Once you understand the basic architecture of convolutional nets, familiarize yourself with common architectures and transfer learning. Depending on what you want to do in computer vision, you can further explore topics like image and video classification, object detection, segmentation, or even image generation. All of these areas have their own dedicated neural network architectures that usually build on convolutional neural networks.
Natural Language Processing
If you are interested in applying machine learning techniques to areas of language processing, such as machine translation and natural language understanding, you will focus on sequence models and transformers. You also have to become familiar with concepts such as word embeddings, LSTMs, and the attention mechanism. These models and mechanisms allow you to understand language in context and create pretty accurate translations and interpretations.
Reinforcement Learning and Robotics
Reinforcement learning is one of the most advanced areas of machine learning that is at the heart of the robotics revolution. I wouldn’t recommend focusing on reinforcement learning from the start. Firstly, as of this writing, RL isn’t as mature as deep learning and classical machine learning. Accordingly, jobs aren’t yet as widespread and are mostly confined to academic research labs.
If you do want to go down the Reinforcement Learning route, you’ll need a solid foundation in math. Topics from statistics and probability theory such as Markov chain Monte Carlo methods are especially important. Prior background in deep learning gives you a good foundation for deep reinforcement learning.
What is the Best Learning Resource for Machine Learning?
The rise of machine learning has been accompanied by the emergence of a plethora of study resources such as online courses, books, and tutorials. Every learner is different, and resources that work for one may not work for another. In this section, I’d like to briefly discuss how to choose the right learning resource for your personal needs.
Online Courses and Tutorials
As a beginner who doesn’t know anything about machine learning, it is hard to decide what to learn and which topics to prioritize. I, therefore, believe that beginners are best served with a course (online or at a university) that takes you by the hand and teaches you the foundation through lectures and hands-on exercises. There are also several hands-on books that offer an alternative to courses for those who prefer reading over watching videos.
Regardless of whether you choose a book or a video course, it is crucial that your learning resource is accompanied by labs and coding challenges.
The same principle also applies when you are diving into a subfield of machine learning for the first time, such as deep learning or reinforcement learning. Take a course or read a hands-on book to get an overview of the field as quickly and painlessly as possible.
Projects and Reading
Once you have gone beyond the beginner stage in machine learning or a subfield of it, hands-on practice should become your main learning source. But while hands-on practice is necessary to build true expertise, it is not sufficient. The very best engineers deliberately use every project as an opportunity for self-improvement. How can you do the same thing?
While you are building machine learning systems, strive to continuously improve your process and deepen your understanding of the problems you encounter. Each time you’ve overcome a challenge, don’t just move on but recall what you’ve learned and actively try to come up with a process that would have made the problem easier to solve.
Most importantly, be humble and always assume that your own implementation is suboptimal and that there are more experienced people out there who would find a better solution.
Even if you have found a solution that technically works, scout the literature for best practices. Perhaps you find a paper, a section in a book, or even a forum entry that describes how to best handle a similar situation. Based on the information you’ve found, improve your own solution.
A Note on Reading books and Papers
Reading and understanding books on machine learning theory can seem overwhelming. After all, many pages are densely plastered with advanced math or code. But books often contain those hidden insights and deeper conceptual understanding that you may not find in a tutorial or an online course.
So I encourage you to read books and papers on machine learning as soon as you have established a foundational knowledge. Over time and with practice, you’ll build a deep repository of knowledge and intuition that will put you on the road to becoming a true expert.