Chapter 2-Notes
Advanced Concepts of Modelling in AI
Note: Write all the answer the following questions on your classwork and submit on 13/05/25
Learning Objective: To compare and contrast different types of AI models and choose the
suitable model based on the complexity of input dataset and requirements
1. In which type of machine learning is the data labeled with the desired output?
a) Supervised Learning
b) Unsupervised Learning
c) Reinforcement Learning
d) Deep Learning
2. An email spam filter that learns to identify spam emails based on labeled examples is an
application of:
a) Supervised Learning
b) Unsupervised Learning
c) Reinforcement Learning
d) Transfer Learning
3. A machine learning algorithm that groups similar customer purchases into clusters for
recommendation systems uses:
a) Supervised Learning
b) Unsupervised Learning
c) Reinforcement Learning
d) Neural Networks
4. An AI agent playing a game and learning from its rewards and penalties is an example of:
a) Supervised Learning
b) Unsupervised Learning
c) Reinforcement Learning
d) Evolutionary Learning
5. Which of the following statements is NOT true about supervised learning?
a) Requires labeled data for training.
b) Used for classification and regression tasks.
c) Can be less efficient for large datasets.
d) Often used in image recognition applications.
6. In an unsupervised learning scenario, the goal is to:
a) Predict a specific output based on labeled data.
b) Identify patterns and relationships within unlabeled data.
c) Train an AI agent through rewards and penalties.
d) Develop complex neural network architectures.
7. Clustering algorithms are commonly used in unsupervised learning for:
a) Spam filtering
b) Image classification
c) Stock price prediction
d) Grouping similar data points
8. Reinforcement learning is particularly useful forscenarios where:
a) Large amounts of labeled data are available.
b) The desired outcome is clear, but the path to achieve it is unknown.
c) The data is structured and easily categorized.
d) The task requires reasoning and logical deduction.
9. Imagine an AI playing a game and learning to win by trial and error. This is an example of:
a) Supervised Learning
b) Unsupervised Learning
c) Reinforcement Learning
d) Natural Language Processing
10. Artificial neural networks are inspired by the structure and function of:
a) The human brain
b) Quantum computers
c) Complex mathematical models
d) High-speed processors
11. The process of adjusting the weights in a neural network to improve performance is called:
a) Activation
b) Learning
c) Optimization
d) Training
12. A neural network with multiple layers of interconnected neurons is called a:
a) Single-layer network
b) Deep Neural Network
c) Linear network
d) Perceptron
13. Neural networks are particularly well-suited for tasks involving:
a) Simple calculations and mathematical operations
b) Recognizing patterns in complex data like images and text
c) Performing logical deductions and reasoning tasks
d) Storing and retrieving large amounts of information
14. Training a neural network often requires:
a) A small set of labeled data samples
b) A significant amount of data and computational resources
c) A specific set of programming instructions
d) A human expert to guide the learning process
Assertion and reasoning-based questions:
Q1. Assertion: Unsupervised Learning is a type of learning without any guidance.
Reasoning: Unsupervised learning models work on unlabeled datasets, where the data fed into the
machine is random and the person training the model may not have any prior information about it.
Options:
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d) A is false but R is True
Q2. Assertion (A): Information processing in a neural network relies on weights and biases
assigned to nodes.
Reasoning (R): These weights and biases determine how strongly a node is influenced by its inputs
and its overall contribution to the next layer.
Both A and R are true and R is the correct explanation for A
Answer the following questions:
Q1. Give difference between rule based and learning based AI models.
Rule Based – The machine follows the rules or instructions defined by the developer and performs
its task accordingly.
For example, Rule-based Chatbots are commonly used on websites to answer FAQs.
Drawback of the rule-based approach
In a rule-based approach, the learning is static, If you try testing the machine on a dataset which is
different from the rules and data you fed it at the training stage, the machine will fail and will not
learn from its [Link] the model is trained, the model cannot improvise itself on the basis of
feedback.
Learning Based – Refers to AI modelling where the machine learns by itself. Under the Learning
Based approach, the AI model gets trained on the data fed to it and figure out patterns and trends
from it. It is able to design a model which is adaptive to the change in data.
Q2. What is supervised, unsupervised and reinforcement learning? Explain with examples.
Learning-based approach can be divided into three parts:
1. Supervised Learning
Supervised learning uses labeled data to train algorithms to predict outcomes. In a supervised
learning model, the labelled dataset is fed to the machine which is known to the person who is
training the machine.
Example
AI model is trained in the weights of the coin with the targets i.e., currency. The trained model can
be be used to identify a coin based on its weight.(feature: weight, label: currency)
2. Unsupervised Learning
It works on unlabeled dataset. In unsupervised learning model the data which is fed to the machine
is random and there is a possibility that the person who is training the model does not have any
information regarding it.
Example: Sending grocery offer message to customers who buy groceries regularly based on
customer database with records of their products bought over a period.
3. Reinforcement Learning
It’s based on repeated trial-and-error learning processes to achieve the goals. This 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.
Examples: question and answering, machine translation, and text summarization.
Positive feedback and negative feedback helps the machine to train the models around the data
Q3. Difference between classification and regression
a. Classification
In this model, the data is classified according to the labels. This model works on discrete dataset
which means the data need not be continuous. For example, in the grading system, students are
classified on the basis of the grades they obtain with respect to their marks in the examination.
b. Regression
In this model, the data fed to the machine is labelled and the model predicts the numerical value
of a new input data based on the training dataset. This models work on continuous data. For
example, if you wish to predict your next salary, then you would put in the data of your previous
salary, any increments, etc., and would train the model.
Q4. Which model you can suggest for the following applications and state the reason for
choosing those models
a) Classifying email as spam or not
b) Predicting temperature
c) Used car price prediction
a)Classifying emails as spam or not: Classification- The model is trained with tons of emails, both
real ones (like from friends or colleagues) and spam. The model learns what makes an email look
like spam. Once trained, the model sees a new email. It analyzes the clues in the email and decides:
is this spam or not? It assigns a category – “spam” or “not spam” – just like sorting your mail.
b)Predicting temperature: Regression-Model is trained with previously recorded temperature
dataset and it will predict the possible range based on the input features. Temperature is a
continuous variable, meaning it can take on any value within a range. Regression models are well-
suited for predicting continuous outputs.
c)Used Car Price Prediction: This model predicts the selling price of the car with the help of a few
parameters like fuel type, years of service, the number of previous owners, kilometers driven,
transmission type (manual/automatic) This type of model will be of type regression since it will
predict an approximate price (continuous value) of the car based on the training dataset.
Q5. Difference between supervised and unsupervised Learning?
Supervised Learning Unsupervised Learning
Deals with labelled data Deals with unlabeled data
Useful in real-world problems like predicting Useful in finding unknown patterns within data
the prices of an item something based on past like making sence of a large number of
trends. observations from an experimental device.
Computing power required is simpler as clean The computing power required is more
labelled data is used as input. complex as unsorted and messy data is used as
input
Q6. What is clustering and how is it different from association?
Unsupervised learning models can be further divided into two categories:
a. Clustering
Refers to the unsupervised learning algorithm which can cluster the unknown data according to
the patterns or trends identified out of it. The patterns observed might be the ones which are known
to the developer, or it might even come up with some unique patterns out of it.
b. Association
Association is another type of unsupervised learning method that uses different rules to find
relationships between variables in a given data set. This is a data mining technique used for better
understanding of customer purchasing patterns based on relationships between various products.
This can be useful to recommend items to customers
Example: Based on the purchase pattern of other customers, we can predict that there is high
probability that any customer x who buys bread will most probably buy butter. Therefore, such
meaningful
Q7. Explain neural networks. Also give functions of three layers of neural networks.
Neural network models are used for problem with large dataset, especially images. This model is
inferred based on-human brain and nervous system. Each node is a machine learning algorithm
which automatically extract data features without the help of programmer
Applications: Facial recognition , Customer support chatbots , Vegetable price prediction
Structure of NN Model
Input layer, Hidden Layers and output Layers
♦ Each layer consist of several blocks called nodes
♦ Each node accomplish its own task and output will be given to next layer
♦ Number of hidden layers depends on the complexity of function
♦ input layer- It acts as an user interface which acquires data and feed to NN , no processing
takes place at this stage
♦ hidden layers-Each node of hidden layer are hidden from user and has its own algorithm to
execute on data, it performs the computation by means of weights and biases which then
passed through an activation function
♦ output layer – gives out the output
♦ The process works in trial and error method weights are adjusted based on the error found
between the NN output and desired output
Q8. What is Deep learning and explain its sub categories?
Deep Learning enables software to train itself to perform tasks with vast amounts of data. In deep
learning, the machine is trained with huge amounts of data which helps it to train itself around the
data. Such machines are intelligent enough to develop algorithms for themselves. There are two
types of Deep Learning models: Artificial Neural Networks (ANN) and Convolution Neural
Network (CNN).
Q9. Differentiate between ANN and CNN
Artificial Neural networks(ANN) - It is modelled based on the human brain and nervous system
which can automatically extract features without input from the programmer. Every neural
network node is essentially a machine learning algorithm. It is useful when solving problems for
which the data set is very large.
Convolutional Neural Network (CNN) - It is a type of deep learning algorithm, which can take in
an input image, assign importance (learnable weights and biases) to various aspects/objects in the
image and be able to differentiate one from the other
Q10. Explain the role of perceptron in decision making OR Explain how AI makes decision
using example ?
1)Identify the factors that affects our decision
2)Rank the factors from most important to least important
“is it sunny now” - Rank 1
“the weather forecast later”-Rank 3
“having a jacket”-Rank 2
“having an umbrella.-Rank 4
3) Assign weights and bias based on ranking. If decision to be cautious then assign higher Wb and
daring to get soaked then assign lower Wb
The values for the weights can come from experience or it can also come from personal preference.
4) Assign input value ( 1 or 0) based on current situation
Assume Current situation:: I have a jacket, I don’t have an umbrella, it is sunny now, and the
weather forecast is going to rain. We can convert the yes and no to numbers 1 and 0. For bias, we
will always take 1.
5) Calculate the output
A person may judge a particular factor more heavily as compared to another person
*******