Machine Learning (ML) continues to evolve at a rapid pace, and staying updated with the latest trends and technologies is crucial for both aspiring and seasoned ML professionals. As we step into 2024, here’s a comprehensive roadmap to guide you through your ML journey, covering essential skills, tools, and concepts.
Day 1 — Get to know a bit about Machine Learning (A literature survey)
One must have a broad understanding of what the subject is at hand. Machine learning is a wide field with various domains. It would be really helpful if one goes through a couple of YouTube videos and/or blogs to get a brief hang of it, and its importance. This video by TedEd is a must watch. It also cover the different types of machine learning algorithms you will face.
Day 2 & Day 3 — Learn a programming language, duh!
There are many programming languages out there, of which only two are suitable for ML, namely Python and R. We recommend any beginner start with Python. Why?
For one, it provides a vast selection of libraries, namely NumPy, pandas, sklearn, TensorFlow, PyTorch, etc., which are super helpful and require little effort for Machine Learning and data science. Before starting, it is important to setup python in your device, using this as a reference.
Learning python is not hard. Here are a few resources which will teach you about the language swiftly:-
Python Tutorial by CodeWithHarry.
Day 4 — Start to get a hang of some of the inbuilt libraries like NumPy
Mathematics is the heart of Machine Learning. You will get a taste of this statement from Week 2. Implementing various ML models, loss functions, and confusion matrix need math. Mathematics is thus the foundation of machine learning. Most of the mathematical tasks can be performed using NumPy.
NumPy, short for Numerical Python, is a powerful library in Python that provides support for large multi-dimensional arrays and matrices along with a collection of mathematical functions to operate on these arrays. It is a foundational library for scientific computing and data analysis in Python, and many other libraries, such as SciPy, Pandas, and TensorFlow, are built on top of NumPy.
This Numpy Tutorial by FreeCodeCamp.org.
Day 5 — Proceed by exploring the other library, Pandas
Pandas is an open-source data manipulation and analysis library for Python. Built on top of NumPy, Pandas offers powerful, flexible, and easy-to-use data structures, such as DataFrames and Series, for working with structured data. It is widely used in data analysis, data cleaning, data visualization, and machine learning.
This Pandas Tutorial by FreeCodeCamp.org.
Day 6 — Matplotlib — a powerful tool for visualization
Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. It is widely used for data visualization in scientific computing, engineering, and data analysis. Matplotlib makes it easy to produce publication-quality plots and graphs with just a few lines of code.
This Matplotlib Tutorial by FreeCodeCamp.org.
Day 7 — What to do on Seventh Day ??
Just Relax! watch some movies on Netflix. I am serious about it, I know guys Machine learning is important , you want job and so on but if you have completed first week honestly, I need to relax .
Day 1 — Descriptive Statistics
By now, you must have been comfortable with processing data using python libraries. Before going further, let us recall some basic concepts of Maths and Statistics. Follow these resources:
● Mean, Variance, Standard Deviation — Read theory from the book, Statistics, 11th Edition by Robert S. Witte, sections 4.1–4.6.
● Correlation in Variables — Read theory from the book, Statistics, 11th Edition by Robert S. Witte, Chapter 6.
Day 2 — Regression Problems
The common problems you would attempt to solve using supervised machine learning can be categorised into either a regression or a classification one. For e.g., Predicting the price of a house is a regression problem while classifying an image as a dog or cat is a classification problem. As you can clearly see, when you are outputting a value (real number), it is a regression problem, while predicting a category (class), we can call it a classification problem.
Linear Regression in Python
Day 3 — Classification using KNNs
K-Nearest Neighbors (KNN) is a simple, non-parametric, and lazy learning algorithm used for classification and regression tasks in machine learning. It works by identifying the ‘k’ closest data points (neighbors) to a given input based on a distance metric, typically Euclidean distance. For classification, the majority class among the neighbors is assigned to the input, while for regression, the average value of the neighbors is used as the prediction.
KNN in Python
Day 4 — Probability and Inferential Statistics
Knowledge of probability is always useful in ML Algorithms. It might sound a bit of an overkill, but for the next two days we will revise some concepts in probability. You can use your JEE Notes or cover theory from the book, Statistics, 11th Edition by Robert S. Witte, sections 8.7–8.10. Go through important theorems like Baye’s Theorem and Conditional Probability.
Day 5 — Inferential Statistics Continued
Complete remaining portion of Week 1 and Week 2 of the Inferential Statistics course. You can also use the book, Statistics, 11th Edition by Robert S. Witte, as a reference.
Day 6 — Naïve Bayes Classifier (Both Multinomial and Gaussian)
These are another kind of classifiers, which just work on Bayes Theorem. For Multinomial Naïve Bayes Classifier, watch this. Then watch the corresponding Gaussian Classifier here.
Day 7 — Preparation for Next Week
Towards the end of the week, let us revise some tools in linear algebra. Revise Vectors, Dot Product, Outer Product of Matrices, Eigenvectors from MTH102 course here.
By now you should have a grasp over what regression means. We have seen that we can use linear regression to predict a continuous variable like house pricing. But what if I want to predict a variable that takes on a yes or no value. For example if I give the model an email, can it tell me whether it is spam or not? Such problems are called classification problems and they have very widespread applications from cancer detection to forensics. This week we will be going over two introductory classification models: logistic regression and decision trees.
Day 1 — Review of Cost functions, hypothesis functions and gradient descent.
As you may recall, the hypothesis function was the function that our model is supposed to learn by looking at the training data. Once the model is trained, we are going to feed unseen data into hypothesis function and it is magically going to predict a correct (or nearly correct) answer! The hypothesis function is itself a function of the weights of the model. These are parameters associated with the input features that we can tweak to get the hypothesis closer to the ground truth. But how do we ascertain whether our hypothesis function is good enough? That’s the job of the cost function. It gives us a measure of how poor or how wrong the hypothesis function is performing in comparison to the ground truth. Here are some commonly used cost functions: https://www.javatpoint.com/cost-function-in-machine-learning .
Gradient descent is simply an algorithm that optimizes the weights of the hypothesis function to minimize the cost function (i.e to get closer to the actual output).
Day 2: Logistic Regression
The logistic regression model is built similarly to the linear regression model, except that now instead of predicting values in a continuous range, we need to output in binary i.e 0 and 1.
Let’s take a step back and try to figure out what our hypothesis should be like. A reasonable claim to make is that our hypothesis is basically the probability that y=1 (Here y is the label i.e the variable we are trying to predict). If our hypothesis function outputs a value closer to 1, say 0.85 it means it is reasonably confident that y should be 1. On the other hand if the hypothesis outputs 0.13 it means there is a very low probability that y is 1, which means it is probable that y is 0. Now, building upon the concepts from linear regression, how do we restrict (or in the immortal words of 3B1B — “squishify”) the hypothesis function between 0 and 1? We feed the output from the hypothesis function of the linear regression problem into another function that has a domain of all real numbers but has a range of (0,1). An ideal function with this property is the logistic function which looks like this: https://www.desmos.com/calculator/se75xbindy. Hence the name logistic regression.
Day 3 & 4 — Getting your hands dirty with code
One thing you must always keep in mind is that while learning about new concepts, there is no substitute for actually implementing what you have learnt. Spend this day trying to come up with your own implementation for logistic regression. You may refer to other people’s implementations. This will surely not be an easy task but even if you fail, you will have learnt a lot of new things along the way and have gotten a glimpse into the inner workings of Machine Learning.
Logistic Regression in Python.
Day 5 & 6 — Decision Trees
Decision trees are a popular and intuitive type of machine learning algorithm used for both classification and regression tasks. They work by recursively splitting the data into subsets based on the value of input features, creating a tree-like model of decisions. Each internal node represents a test on an attribute, each branch represents the outcome of the test, and each leaf node represents a class label or continuous value (for regression). The goal is to create a model that predicts the target variable by learning simple decision rules inferred from the data features.
Advantages of Decision Trees
- Interpretability: Easy to understand and visualize.
- Versatility: Can handle both numerical and categorical data.
- Minimal Data Preparation: Requires little data preprocessing, such as scaling or normalization.
Disadvantages of Decision Trees
- Overfitting: Can create complex trees that do not generalize well to unseen data.
- Bias: Sensitive to small changes in the data, which can result in different splits.
- Complexity: Large trees can become unwieldy and difficult to interpret.
Implementing Decision trees using Python.
Day 7: Revision Revision and Revision !
Up till now, you have some of basic and most used algorithms in Machine learning, next is Deep learning( finally Neural Networks !). So, revise everything till now and gets your hands dirty by implementing ML concepts on various datasets.
Finally, solve the Titanic challenge on Kaggle: https://www.kaggle.com/competitions/titanic
The last 3 weeks of this roadmap will be devoted to Neural Networks and their applications.
Day 1 — The perceptron and Neural Networks
The ultimate goal of Artificial Intelligence is to mimic the way the human brain works. The brain uses neurons and firing patterns between them to recognize complex relationships between objects. We aim to simulate just that. The algorithm for implementing such an “artificial brain” is called a neural network or an artificial neural network (ANN). At its core, an ANN is a system of classifier units which work together in multiple layers to learn complex decision boundaries.
The basic building block of a neural net is the perceptron. These are the “neurons” of our neural network.
First Video on NN series by 3Blue1Brown.
Day 2: Backpropagation
Now you might be wondering how to train a neural network. We are still going to be using gradient descent (and its optimized forms) but to calculate the gradients of the weights we will be using a method called backpropagation.
To get a visual understanding you are encouraged to watch the remaining 3 videos of 3B1B’s series on Neural Networks.
Day 3 & 4 — Implementation
Dedicate these two days to try to implement a neural network in python from scratch. Try to have one input, one hidden and one output layer.
I found this playlist where you will understand how to implement NN using Numpy.
Day 5, 6 & 7 — PyTorch
We will now start building models based on neural Networks like ANN, CNN, RNN, LSTM and so on. For building these models, we have to choose one deep learning frameworks like PyTorch, Tensorflow or JAX.
I personally recommend PyTorch. You can checkout my deep learning series using PyTorch on Medium itself.
PyTorch is an open-source machine learning library developed by Facebook’s AI Research lab (FAIR). It is widely used for deep learning applications such as computer vision and natural language processing. PyTorch provides a flexible and efficient framework for building and training neural networks, offering dynamic computation graphs that allow for more intuitive and Pythonic development.
Link to PyTorch official website .
Checkout this playlist for learning basics for framework, you should understand training pipeline, loss function, different types of optimizers, data loader and data transforms, activation functions and so on.
Day 1: Introduction to Computer Vision
Now having understood the basics of logistic regression, pytorch and image processing, its time to further our understanding and move into the domain of Computer Vision. Computer Vision is all about giving 1s and 0s the ability to see. A Convolutional Neural Network is a Deep Learning algorithm that can take in input images and be able to differentiate one from the other or maybe identify some objects in the image.
Convolution is a mathematical operation to merge two sets of information.
This is blog is awesome to understand the basics of CNNs.
Day 2
Now its time to revise and implement some part of what we did yesterday and implement it in one of the applications.
The assignments of the course are available on this GitHub repository. You can clone the whole repository and open the C4 convolutional neural networks folder followed by week 1. You’ll find all the programming assignments here. GitHub Repository. Please check out the issues section of this repository as well.
Day 3
This completes our basic understanding of CNNs. Now, Lets understand some basic networks that are required to implement CNNs. In this roadmap, for the week, we’ll tell you to cover Residual Networks only, however to get an in depth knowledge of the topic, you can read about the other networks (MobileNet, etc) later on.
For day 3, Watch the week 2 lectures on ResNet (First 5 videos of week 2) of that course on coursera and solve the first assignment on residual networks (using the same GitHub repository).
Day 4 & 5
Watch the first 9 lectures of week 3 (until the YOLO detection algorithm) and solve the assignment on car detection with YOLO. A nice blog on the working of YOLO is available here. You can refer to it alongside the course. Read Here
YOLOv1 from Scratch — YouTube tutorial
Day 6 & 7
Cover the remaining portion of week 3 and try to do the assignment on image segmentation with U net from the GitHub repository.
Further resources
- https://www.youtube.com/playlist?list=PLoROMvodv4rMiGQp3WXShtMGgzqpfVfbU
- https://www.coursera.org/specializations/deep-learning
The field of Machine Learning is vast and continuously evolving. By following this roadmap, you can build a strong foundation, specialize in cutting-edge technologies, and stay abreast of the latest trends in 2024. Remember, consistency and curiosity are key to mastering ML. Happy learning!