Machine Learning for Dummies


6 min read

Machine Learning for Dummies

Photo by Alex Knight on Unsplash

Welcome to the Intro on ML! I'm Brahma ๐Ÿ‘‹, a passionate software developer. I am documenting my learning journey through a series of blog posts. Stay tuned!!


Machine Learning and Artificial Intelligence have been the talk of the town for quite some time now. All thanks to OpenAI's LLM model ChatGPT, AI is now accessible to everyone. But ignoring all the jazz on the surface, let's get to the tip of the iceberg.

Let's get to know what is AI, Machine Learning, Deep Learning and all that jargon in today's blog. Stay tuned to know more!!

First, let's know whether all of these refer to the same thing. Ofc not!! there is a subtle difference between various terms that are often used interchangeably.

Have a look at the following picture:

AI vs Machine Learning vs Deep Learning: What's the Difference | Sitech

So, let's understand what the picture has to say.

Artificial Intelligence (AI): AI is the broadest concept that refers to machines designed to simulate human intelligence. These machines can perform tasks such as problem-solving, learning, and decision-making. AI encompasses various techniques, including rule-based systems, logic, and algorithms, to enable machines to exhibit human-like capabilities.

Machine Learning (ML): ML is a subset of AI that focuses on the development of algorithms that allow computers to learn from and make decisions based on data. Instead of being explicitly programmed to perform a task, ML models are trained on data to recognize patterns and make predictions. ML techniques include supervised learning, unsupervised learning, and reinforcement learning.

Deep Learning (DL): DL is a specialized subset of ML that uses neural networks with many layers (hence "deep") to analyze various factors of data. These neural networks can automatically discover representations from raw data without the need for manual feature extraction. DL has driven advancements in fields like computer vision, natural language processing, and speech recognition due to its ability to handle large datasets and complex models.

Now, that we know some of the jargon that is involved in the market. Let's get some more understanding of ML in depth.

What is Learning?

Before knowing about Machine Learning, let's first understand what is Learning coz you already know what a Machine is. (I hope you do ๐Ÿ˜‚)

Let's take the example of a rat. A clever human sets a trap to catch a rat by mixing poison into some food and placing it as bait. Unaware of the danger, the rat ate the food and fell ill but survived. The rat, determined to avoid this fate again, remembered the distinct smell of the tainted food. The next time it encountered the same food, it recognized the smell and wisely avoided eating it, preventing another bout of illness. The rat's newfound caution kept it safe from future traps, showcasing its ability to learn and adapt from past experiences.

This is called Learning. In simple words, learning is understanding past experiences and working on them to improve future performance.

Similarly, machines can learn in a similar way. There are various high-level techniques of ML but let's focus on a basic one now.

Consider an algorithm, akin to the rat in our previous example, that can memorize patterns from data it processes. When training data (like the poisoned food) is fed into the algorithm, it learns and memorizes specific characteristics (such as the smell of the poisonous food). This process trains the algorithm, enabling it to recognize and react to similar data in the future, just as the rat learned to avoid dangerous food based on its smell. This memorization allows the algorithm to improve its performance and make informed decisions when encountering new data.

Learning by Memorisation

Memorising concepts for exams is quite a common trait found in almost every student. This method of learning can be dangerous at times as it can lead to false predictions.

Consider an algorithm designed to filter spam and ham emails. It is trained using a set of example spam emails. The algorithm memorizes the characteristics of these spam emails and can effectively filter out new emails that are similar to the training examples. However, when it encounters spam emails that differ from those in the training data, it may fail to identify them as spam. This limitation can cause problems for systems relying on the algorithm, as it may not adapt well to new or varied spam patterns, resulting in missed spam and incorrect filtering.

In essence, the algorithm's reliance on memorization can hinder its ability to generalize and accurately filter out all types of spam emails, demonstrating the potential pitfalls of this learning approach.

What is Machine Learning?

Machine Learning is an Artificial Intelligence domain where we extract patterns from the data and analyse them to make intelligent predictions on the new data according to the pattern the machine has learnt.

But how exactly does a machine extract patterns? How does it analyse data? How does it make predictions?

So, machines are fed with sets of mathematical algorithms that help them extract patterns from the data. Using these patterns, it makes predictions.

Steps Involved in Creating ML System

In a high-level overview, this is what happens:

  1. Scoping: It refers to understanding the problem statement and the key requirements for the ML project.

  2. Data: It involves collecting and validating data as well as cleaning and processing them for further usage.

  3. Modelling: It involves researching and building algorithms. Then training them and performing the error analysis.

  4. Deployment and Maintenance: It involves deploying a model to production and monitoring & maintaining it.

Types of ML Algorithms

Broadly ML algorithms are divided into 4 major types:

  1. Supervised Learning: You are given a data set with both inputs and expected outputs provided. It is further divided into 2 types:

    1. Regression: When the target variable we want to predict is continuous. e.g., predicting house prices, revenue prediction, etc.

    2. Classification: Here the target variable is discrete. e.g., Prediction of diabetes, cancer, etc.

  2. Unsupervised Learning: You are given a data set with only inputs and no expected outputs are provided. The model then does its work by making sense of what's going on in the data. It is further divided into 4 types:

    1. Clustering: Some data is given and it is clustered into various groups.

    2. Dimensionality Reduction: Reducing too many of the input data columns to make the clustering easier.

    3. Anomaly Detection: Detects any abnormal data points.

    4. Association rule learning

  3. Semi-Supervised Learning: It's like you have to label some given data but it's tedious to do it (ofc!!). So what you do is you label some of it and the ML model observes and understands how to label and label the remaining data on its own.

  4. Reinforcement Learning: You have a model with no input data and it has to learn by making mistakes.


Understanding the distinctions between Artificial Intelligence, Machine Learning, and Deep Learning is crucial in appreciating the capabilities and limitations of each. AI represents the broadest concept, aiming to mimic human intelligence in machines. Machine Learning, a subset of AI, focuses on algorithms that learn from data to make predictions. Deep Learning, a further subset of ML, employs complex neural networks to handle large datasets and intricate patterns.

While these technologies offer immense potential, it's important to recognize their limitations. For example, an algorithm that relies solely on memorization can struggle with new or varied data, as seen in our spam filter example. Therefore, continuous learning and adaptation are key to the effective deployment of AI and ML systems.

In summary, the ongoing advancements in AI, ML, and DL are shaping a future where machines can perform increasingly complex tasks, but careful consideration of their training and application is essential to harness their full potential.


That's all for now folks!! See you in the next one.๐Ÿ”ฅ๐Ÿ’ช

Keep coding, keep learning, and enjoy the endless possibilities that Python has to offer!

Signing off!!!๐Ÿ‘‹