Machine Learning and how to learn it

Let's start with an overview of ML. Machine Learning is a technique by which an algorithm or model learns from and makes decisions based on data without being programmed to do so.

Sometimes Artificial Intelligence and Machine Learning are considered to be the same even if they have a difference between them

Artificial Intelligence vs Machine Learning

Imagine, there is a toy robot that can perform different tasks like singing a song, or solving puzzles. This robot is an example of Artificial Intelligence as it can do tasks that require human intelligence.

Now, let's say the robot learns to do a new task like catching a ball or writing a blog article by watching someone else do it a few times. That's what we call Machine Learning (ML). The robot learned how to catch a ball, and write blogs without being explicitly programmed to do so.

The example above gives a brief idea about the difference between Machine Learning and AI. The example is taken from ChatGPT, the modern powerful AI.

So, when I asked this question to ChatGPT, it found an answer which met the needs of my question and answered the question. It did a task that required human intelligence. So, that is why we call Chat GPT an AI

differentiate ai and ml such that it can be understood by a 6 years old boy

Now, let's go back to the time when it was created. It was provided a sample set of data which contained a bunch of prompts and their answers. From that data, it learned to answer questions like this. An algorithm was used so that it can extract the data and find patterns between them. Thus, it learned how to answer these kinds of questions by finding similar patterns in data. This process by which the algorithm learned to answer these kinds of questions is a process of Machine Learning.


I have seen many roadmap videos on YouTube and some stuff is common in every Machine Learning Roadmap video. So, I'll give you a detailed roadmap of Machine Learning

A. Mathematics

It is the backbone of machine learning, providing the tools and concepts needed to understand and apply the algorithms and models used in the field. The topics of mathematics required for Machine Learning are:

  1. Linear Algebra

  2. Statistics and Probability

  3. Calculus

Let's learn the importance of these topics

Linear Algebra

Linear Algebra helps in playing with numbers arranged in rows and columns (known as matrices). Imagine, you have a toy box with many toys in it. Each toy can be represented as a number. Linear Algebra helps to work with these kinds of matrices by performing operations like addition, subtraction, and multiplication and it can help to find patterns in the numbers.

So, imagine you have a toy robot that you want to teach to make decisions based on lots of data. You can use Linear Algebra to help the robot understand and analyze the data.

Statistics and Probability

Imagine you want to teach a robot to predict the weather. Statistics and Probability can help the robot understand how likely it is to rain based on past weather data. The robot can then predict the weather.

We use Statistics and probability to help our toy robot guess what might happen in the future, based on what has happened in the past.


Calculus is like a GPS system for the robot that helps it find the best way to learn. Just like a GPS helps us find the quickest route to a destination, Calculus helps our robot find the quickest and easiest way to learn new things.

So, the work of optimizing ML algorithms (also called models) is done by Calculus

You don't need to learn everything about these. You can do a Ph.D. in these topics and spend most of your life learning about Maths and not ML also. But if you want the fast way, then learn these specific topics

Linear Algebra Topics

  1. Vectors and vector operations:

    • Definition and representation of vectors

    • Vector addition and subtraction

    • Scalar multiplication

    • Dot product and cross product

    • Length and normalization of vectors

    • Angle between vectors

    • Orthogonal and orthonormal sets of vectors

  2. Matrix operations:

    • Definition and representation of matrices

    • Matrix addition and subtraction

    • Scalar multiplication

    • Matrix multiplication

    • Transpose of a matrix

    • Trace of a matrix

    • Determinant of a matrix

    • Inverse of a matrix

  3. Determinants, inverses, and eigenvalues/eigenvectors:

    • Determinant of a matrix and its properties

    • Inverse of a matrix and its properties

    • Eigenvalues and eigenvectors of a matrix

    • Diagonalization of matrices

    • Characteristic polynomial of a matrix

    • Jordan form of a matrix

  4. Linear systems of equations and Gaussian elimination:

    • Solving linear systems of equations using Gaussian elimination

    • Gauss-Jordan elimination

    • LU decomposition

    • QR decomposition

    • Singular value decomposition (SVD)

  5. Orthogonality and projections:

    • Orthogonal and orthonormal sets of vectors

    • Projections and orthogonal projections

    • Orthogonal basis and orthonormal basis

    • Orthogonal matrices and orthonormal matrices

    • Gram-Schmidt process

  6. Singular value decomposition (SVD):

    • Definition and properties of SVD

    • Computing SVD of a matrix

    • Applications of SVD in data compression and denoising

    • Low-rank approximations of matrices

  7. Principal Component Analysis (PCA):

    • Definition and intuition behind PCA

    • Computing the principal components of a dataset

    • Dimensionality reduction using PCA

    • Applications of PCA in data visualization and feature extraction

  8. Matrix factorization methods:

    • Non-Negative Matrix Factorization (NMF)

    • Latent Dirichlet Allocation (LDA)

    • Collaborative Filtering

  9. Least squares optimization and gradient descent:

    • Least squares optimization

    • Gradient descent algorithm

    • Stochastic gradient descent (SGD)

    • Convergence analysis of gradient descent

    • Batch gradient descent vs. stochastic gradient descent

Statistics and Probability Topics:

  1. Probability:

    • Axioms of probability

    • Conditional probability

    • Bayes' Theorem

    • Joint and marginal distributions

    • Independence and dependence

    • Random variables and expected value

    • Variance and covariance

  2. Probability Distributions:

    • Discrete distributions (Bernoulli, Binomial, Poisson, etc.)

    • Continuous distributions (Uniform, Normal, Exponential, etc.)

    • Characteristic functions and moment generating functions

    • Estimation of parameters (Maximum Likelihood, Moment Estimation, etc.)

    • Convergence in distribution

  3. Hypothesis Testing:

    • Null and alternative hypotheses

    • p-values and significance levels

    • Type I and Type II errors

    • One-sample and two-sample tests

    • t-tests and ANOVA

    • Chi-square tests

  4. Confidence Intervals:

    • Definition and properties of confidence intervals

    • Central Limit Theorem and normal approximation

    • t-intervals and proportion intervals

  5. Regression Analysis:

    • Simple linear regression

    • Multiple linear regression

    • Logistic regression

    • Polynomial regression

    • Regularization (Ridge, Lasso, etc.)

  6. Statistical Inference:

    • Point estimation

    • Interval estimation

    • Maximum Likelihood Estimation

    • Bayesian inference

    • Central Limit Theorem and Law of Large Numbers

  7. Machine Learning specific topics:

    • Overfitting and underfitting

    • Bias-variance tradeoff

    • Cross-validation

    • Regularization

    • Maximum likelihood and maximum a posteriori (MAP) estimation

Calculus Topics

  1. Differentiation:

    • Limits and derivatives

    • Rules for differentiation (power rule, sum rule, product rule, chain rule, etc.)

    • Partial derivatives and gradient

    • Jacobian matrix

    • Implicit differentiation

  2. Integration:

    • Indefinite and definite integrals

    • Fundamental Theorem of Calculus

    • Techniques for integration (substitution, integration by parts, partial fractions, etc.)

  3. Multivariate Calculus:

    • Partial derivatives and gradient

    • Hessian matrix and second partial derivatives

    • Laplacian and Laplace's equation

    • Extrema of multivariate functions

    • Constrained optimization and Lagrange multipliers

  4. Differential Equations:

    • Ordinary Differential Equations (ODEs)

    • Separation of variables, Euler's method, and Runge-Kutta method

    • Partial Differential Equations (PDEs)

    • Heat equation and wave equation

  5. Probability and Statistics:

    • Probability distributions (discrete and continuous)

    • Expectation and variance

    • Joint and marginal distributions

    • Conditional probability

    • Correlation and covariance

  6. Optimization:

    • Unconstrained optimization and local minima/maxima

    • Constrained optimization and Lagrange multipliers

    • Gradient descent and stochastic gradient descent

    • Newton's method and quasi-Newton methods

    • Convex optimization

B. Programming

  1. Programming with Python

  2. Libraries:

    1. Numpy

    2. Pandas

    3. Matplotlib

Now, you have a solid foundation in Mathematics and programming. So, the next step is to learn the basics of ML algorithms

C. Basics of ML Algorithms

  1. Supervised Learning:

    • Linear Regression

    • Logistic Regression

    • Decision Trees

    • Random Forest

    • Support Vector Machines (SVM)

    • K-Nearest Neighbors (KNN)

    • Naive Bayes

  2. Unsupervised Learning:

    • K-Means Clustering

    • Hierarchical Clustering

    • Density-Based Clustering

    • Principal Component Analysis (PCA)

  3. Reinforcement Learning:

    • Markov Decision Processes (MDP)

    • Q-Learning

    • Monte Carlo Methods

  4. Deep Learning:

    • Neural Networks

    • Convolutional Neural Networks (CNN)

    • Recurrent Neural Networks (RNN)

    • Long Short-Term Memory (LSTM)

    • Autoencoders

  5. Model evaluation techniques:

    • Overfitting and underfitting

    • Bias-Variance tradeoff

    • Cross-Validation

    • Hyperparameter tuning

Now, you have become an intermediate in ML. Its time to upgrade your ML sword now. To sharpen your sword of ML, you must Practice. One great resource is Kaggle

How to Learn

In this article, you have seen the roadmap for learning Machine Learning. But there are some techniques I would like to tell you which will accelerate your learning process.

I have given you individual topics. So, you can search them in sequence one by one on YouTube and Google and you can gather the explanation from there.

I would like to tell you about one of the newest techniques for simplifying your understanding. If you are here, you might know about ChatGPT

You can use that as a tool to accelerate your learning process. Here's how you should learn for a simplified and better understanding:

  1. Let's say you want to learn a specific topic from the list

  2. Go to Chat GPT and write this prompt

    •     Write a basic article on [topic] so that a child can understand it
  3. Now, once you know the overview of the topic you are learning, you can search on YouTube or Google for a better understanding

  4. Exception: Let's say you didn't understand a subtopic of the topic you are learning (read the sentence again) from YouTube after following my steps. Then repeat the 2nd step and just change [topic] to your [subtopic]


And there you have it folks, everything you need to know about Machine Learning, and the way to learn it. Whether you're a toy robot trying to learn how to solve puzzles or a human trying to understand the complexities of AI, this article has got you covered.

So, dive into the world of ML. And let me tell you one little secret. I have used Chat GPT intensely to make this article also. It gave me an explanation of the robot which I used earlier. The subtopics are also generated by it. So, use ChatGPT and remember one thing that I learned from Kunal Kushwaha's Twitter handle:

AI will not replace you. A person who is using AI will replace you.