In this tutorial, we will cover subunit 2.2 AI Modelling of Unit 2: Advanced Concepts of Modeling in AI of the AI-417 course for Class 10.
For Part 1 of this unit 2.1: Revisiting AI, ML, and DL, click on the link below:
Unit 2: Revisiting AI, ML and DL (AI Course; Class – X) – Part 1
AI Modelling
AI Modelling refers to developing algorithms, also called models, which can be trained to get intelligent outputs. That is, writing code to make a machine artificially intelligent.

In general, there are two approaches researchers take when building AI models: a rule-based approach or a learning-based approach. Learning-based approaches are further divided into Supervised Learning, Unsupervised Learning, and Reinforcement Learning.
Rule-Based Approach
A Rule-Based Approach refers to AI modelling where the relationships or patterns in data are defined by the developer. The machine follows the rules or instructions mentioned by the developer and performs its task accordingly.
Example: A Rule-Based Chatbot
Rule-based chatbots are commonly used on websites to answer FAQs or provide basic customer support. Consider a clothing website chatbot that answers questions about order tracking:
- Data: The chatbot doesn’t require a massive dataset for training. It relies on a predefined set of questions and corresponding answers.
- Rules: The chatbot uses a decision-tree approach with clearly defined rules to understand user queries and provide responses. For example:
=> If the user’s message contains keywords like “track order,” “shipment status,” or “delivery,” proceed to order tracking options.
=> Under order tracking options: if the user provides their order number, retrieve and display the tracking information; if the number is invalid, ask them to re-enter it.
=> If the user’s message doesn’t match any defined rules, offer a message like “Sorry, I can’t help you with that. Perhaps you can try searching our FAQs or contact customer support.” - Interaction: When a user chats with the bot, their message is analyzed against the defined rules, and the bot responds with a pre-written answer or prompts for more information.
Drawback
A key limitation of this approach is that the learning is “static”. Once trained, the machine doesn’t take into account any changes made to the original training dataset. If you test the machine on data different from what it was trained on, it will fail and won’t learn from its mistake. Once trained, the model cannot improvise itself based on feedback. Machine Learning gets introduced as an extension to this. The machine adapts to changes in data and rules, while a rule-based model only ever does what it has been taught once.
Learning-Based Approach
A learning-based approach is a method where a computer learns how to do something by looking at examples or getting feedback, similar to how we learn from experience. Instead of being explicitly programmed for a task, the computer learns to perform it by analyzing data and finding patterns or rules on its own.
Example: Dog Clustering
Suppose you have a dataset of 1,000 images of random stray dogs from your area. You have no clue what trend is being followed in this dataset. You don’t know their breed, color, or any other feature. Put this into a learning-based AI model, and the machine comes up with various patterns it observes in the features of these images. It might cluster the data based on color, size, fur style, etc. or even come up with an unusual clustering approach you hadn’t thought of.
We can say that a learning-based model refers to the AI modelling where the machine learns by itself. Under this approach, the AI model gets trained on the data fed to it and is then able to design a model that is adaptive to changes in the data handling exceptions rather than failing on them.
Example: A Learning-Based Spam Email Filter
Instead of being explicitly programmed with rules for identifying spam, the filter learns from examples of labeled emails during a training phase. It’s provided with a large dataset of emails, each labeled spam or legitimate, and analyzes content and characteristics based on words used, sender information, presence of attachments, to learn patterns that distinguish spam from legitimate emails. Once trained, the filter can classify new incoming emails, continuously adapting and improving its accuracy as it encounters new examples.
Categories of Machine-Learning Based Models
Learning-based approaches are a broad category that encompasses both machine learning and deep learning. Machine learning can further be divided into three parts: Supervised Learning, Unsupervised Learning, and Reinforcement Learning.

Supervised Learning
In a supervised learning model, the dataset fed to the machine is labelled. In other words, the dataset is known to the person training the machine, only then are they able to label the data. A label is information used as a tag for data.
- Supervised Learning indicates having a supervisor, like a teacher.
- For example, a math teacher teaches the class by making students learn using a lot of solved examples (training), and then tests the knowledge gained by giving the class problems to solve on their own.
- Similarly, Supervised Learning is when you make the machine learn by training it using labeled data.
Example: Currency coins
Problem Statement is to build a model to predict the coin based on its weight. Assume we have different currency coins with different weights: 1 Euro weighs 5 grams, 1 Dirham weighs 7 grams, 1 Dollar weighs 3 grams, 1 Rupee weighs 4 grams, and so on.
- Feature — weight
- Label— currency
If a model is trained by tagging the features (the weights of the coin) with the targets (currency), the trained model can then be used to identify a coin based on its weight, since it has already learned the pattern.
Another example is of a model trained on labeled input data of dogs and cats learns to classify new images as dogs or cats. It learns from the training data and then applies that same knowledge to test data.
Unsupervised Learning
An unsupervised learning model works on an unlabeled dataset. This means the data fed to the machine is random, and there’s a possibility that the person training the model has no information regarding it. Unsupervised learning models are used to identify relationships, patterns, and trends in the data fed into them, helping the user understand what the data is about and what the major features are.
- Unsupervised Learning is a type of learning without any guidance.
- For example, a child learning to swim on their own without supervision. The child is the model, trying to discover ways and techniques to swim, and the swimming pool is similar to the unknown data fed to the model.
- The machine is responsible for discovering patterns, similarities, and differences on its own, based on the unlabeled dataset.
Example: A supermarket customer database.
Assume we have a customer database with records of products bought over a period. As the marketing manager, you decide to send a grocery offer message to customers who buy groceries regularly. Note that no customer was labeled a “grocery shopper” or “non-grocery shopper”. The model discovers these patterns on its own and comes up with these two clusters/groups.
Another example is of the model processes unlabeled information (images of cats and dogs) without any labels, analyzing the data to identify hidden patterns and attributes, then using that to classify the animals into two categories based on similarities. All cats grouped into one cluster, all dogs into another.
Test Yourself: Supervised or Unsupervised?
Case 1: Social media platforms identify your friend in a picture from an album of tagged photographs.
Explanation: It is supervised learning. The social media platform is using tagged photos to recognize the person. The tagged photos become the labels, and when a machine learns from labeled data, it’s supervised learning.
Case 2: An OTT platform recommends shows based on someone’s watch history.
Explanation: It is unsupervised learning. This is what platforms like Netflix, Pandora, and Spotify do all the time. They collect the songs/movies you already like, evaluate the features based on your likes/dislikes, and then recommend new content based on similar features.
Case 3: A bank analyzes transaction data for suspicious-looking transactions and flags fraud (note that suspicious transactions are not predefined).
Explanation: It is unsupervised learning. Since the suspicious transactions are not defined in advance, there are no labels of “fraud” and “not fraud”. The model identifies outliers by looking at anomalous transactions and flags them as fraud.
Reinforcement Learning
This learning approach enables the computer to make a series of decisions that maximize a reward metric for the task, without human intervention, and without being explicitly programmed to achieve the task. Reinforcement learning is a type of learning in which a machine learns to perform a task through a repeated trial-and-error method.
Example
You provide an image of an apple to the machine and ask it to predict what it is. The machine first predicts “cherry,” and you give negative feedback that it’s incorrect, the machine learns it’s not a cherry. You show it the apple image again; this time it predicts “apple,” and you give positive feedback that it’s correct, now the machine has learned this is an apple and that’s how reinforcement learning works.


What makes it different?
1. For supervised and unsupervised learning, you need a pretty good idea of the data you have, what’s going on, and how to solve the problem.
2. However, you’ll frequently encounter situations involving large, complex problem spaces.
3. You may need to respond to unforeseen environments, without sufficient data on those specific scenarios.
4. The environment may change — so your system needs to be adaptive.
Reinforcement Learning is important because it doesn’t require a lot of pre-existing knowledge or data to provide useful solutions.
Examples of Reinforcement Learning
- Parking a car without human intervention.
- Humanoid walking.
Summary of ML Models
- Supervised learning models are used when we want to determine relationships through training.
- Unsupervised learning models are used when we want to discover new patterns from data.
- Reinforcement learning models are used when we want to implement machine learning through a reward mechanism.
Test Yourself
- What is the key difference between a rule-based approach and a learning-based approach?
- Why is the learning in a rule-based model described as static?
- In the currency coin example, identify the feature and the label.
- Identify the model: is predicting a customer’s loan eligibility based on labeled past applicants a supervised or unsupervised problem?
- What is the main goal of reinforcement learning?
- Give one real-world example each of supervised, unsupervised, and reinforcement learning, other than the ones covered in this post.
Stay Tuned!!
Stay tuned for Part 3 of this unit, where we cover Machine Learning Subcategories: Supervised, Unsupervised and Deep Learning with their further division in a simplified and practical manner.
Click below for the YouTube video for Part 2 of Unit 2:
For any queries and clarification, kindly email us at datasciencehorizon@gmail.com
Keep learning and keep implementing!!


