Choose the most appropriate answer for each question.
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 for scenarios 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.
Ans: Both A and R are true and R is the correct explanation for A
Answer the following questions:
Q1. Give the difference between rule based and learning based AI models.
Q2. What is supervised, unsupervised and reinforcement learning? Explain with
examples.
Q3. What is clustering and how is it different from classification?
Q4. Explain neural networks. Also give functions of three layers of neural networks.
Q5. Differentiate between classification and regression model.
Q6. What is a neural network? Give the functioning of its three layers?
Q7. Identify the type of learning (supervised, unsupervised, reinforcement learning) are
the following case studies most likely based on?
a) Case Study 1: A company wants to predict customer churn based on past purchasing
behavior, demographics, and customer interactions. They have a dataset with labeled
examples of customers who churned and those who did not.
Ans: Supervised
b) Case Study 2: A social media platform wants to group users based on their interests
and behavior to recommend relevant content. They have a large dataset of user
interactions but no predefined categories. Which type of learning is this case study most
likely based on?
Ans: Unsupervised
c) Case Study 3: An autonomous vehicle is learning to navigate through a city
environment. It receives feedback in the form of rewards for reaching its destination
safely and penalties for traffic violations. Which type of learning is this case study most
likely based on?
Ans: Reinforcement
d) Case Study 4: A healthcare provider wants to identify patterns in patient data to
personalize treatment plans. They have a dataset with various patient attributes but no
predefined labels indicating specific treatment plans. Which type of learning is this case
study most likely based on?
Ans: Unsupervised
e) Case Study 5: A manufacturing company wants to optimize its production process by
detecting anomalies in sensor data from machinery. They have a dataset with examples
of normal and anomalous behavior. Which type of learning is this case study most likely
based on?
Ans: Supervised
Q8. Identify the type of model (classification, regression, clustering, association model)
are the following case studies most likely based on?
a) A bank wants to predict whether a loan applicant will "default" or "non-default" on
their loan payments. They have a dataset containing information such as income, credit
score, loan amount, and employment status.
Ans: Classification
b) A real estate agency wants to predict the selling price of houses based on various
features such as size, location, number of bedrooms, and bathrooms. They have a
dataset containing historical sales data.
Ans: Regression
c) A marketing company wants to segment its customer base into distinct groups based
on purchasing behavior for targeted marketing campaigns. They have a dataset
containing information such as purchase history, frequency of purchases, and amount
spent.
Ans: Clustering
d) A grocery store wants to identify associations between different products purchased
by customers to understand which products are commonly bought together. They have
a transaction dataset containing records of items purchased together during each
transaction.
Ans: Association
Q9. A healthcare provider wants to improve patient care by predicting the length of
hospital stays for different medical conditions. They have a dataset containing patient
demographics, medical history, and treatment details. The task involves:
a) To predict whether a patient will have a short or long hospital stay.
Ans: Classification
b) To predict the number of days a patient will stay in the hospital.
Ans: Regression
c) To segment patients into groups with similar characteristics for personalized
treatment plans.
Ans: Clustering
d) To identify patterns in patient treatments and outcomes.
Ans: Association
Identify the type of model (classification, regression, clustering, and association model)
in the above tasks.
Q10. Convert the following scenarios to perceptron:
a) Context: A manager is deciding whether to approve a work-from-home request
from an employee.
Factors: - Does the employee perform well when working remotely?
- Are there any upcoming team meetings or collaborative projects?
- Does the company's policy support remote work?
- Is it beneficial for both the employee and the company?
Ans:
To convert this scenario into a perceptron model, we need to translate each factor into
a numerical input, assign weights (reflecting the importance of each factor), and apply
a threshold (or activation function) to decide whether to approve (1) or deny (0) the
request.
Inputs (x):
Each input is either 1 (yes/true) or 0 (no/false):
Factor Input Variable Description
Employee performs well X1 1 = Yes, 0 = No
remotely
Upcoming team X2 1 = No meetings
meetings/projects (favorable), 0 = Yes (not
favorable)
Company policy supports X3 1 = Yes, 0 = No
remote work
Beneficial for both X4 1 = Yes, 0 = No
Weights (w):
Weights represent how important each factor is in the decision.
Let’s assign arbitrary weights:
● w₁ = 4 (performance is crucial)
● w₂ = 3 (team availability matters)
● w₃ = 2 (policy is important)
● w₄ = 1 (mutual benefit is a strong factor)
Using Bias Method
Consider Bias and Bias Weight is 1 and 5 and Bias will be as
Always 1
✅ Example 1 (Approve):
● Employee performs well → x₁ = 1
● No team meetings → x₂ = 1
● Company policy supports → x₃ = 1
● Beneficial → x₄ = 1
y=(4)(1)+(3)(1)+(2)(1)+(1)(1)-(5)(1)=5≥0⇒Approve
❌ Example 2 (Deny):
● Employee performs poorly → x₁ = 0
● Team meetings scheduled → x₂ = 0
● Company policy supports → x₃ = 1
● Not beneficial → x₄ = 0
y=(4)(0)+(3)(0)+(2)(1)+(1)(0)-(5)(1)=-3<0⇒Deny
Using Threshold value: Threshold=5
✅ Example 1 (Approve):
● Employee performs well → x₁ = 1
● No team meetings → x₂ = 1
● Company policy supports → x₃ = 1
● Beneficial → x₄ = 1
y=(4)(1)+(3)(1)+(2)(1)+(1)(1)=10≥5⇒Approve
❌ Example 2 (Deny):
● Employee performs poorly → x₁ = 0
● Team meetings scheduled → x₂ = 0
● Company policy supports → x₃ = 1
● Not beneficial → x₄ = 0
y=(4)(0)+(3)(0)+(2)(1)+(1)(0)=2<5⇒Deny
b) Context: A homeowner is deciding whether to invest in solar panels for their house.
Factors: - Do I have a sufficient average amount of sunlight in my area?
- Are there any available incentives or rebates for installing solar panels?
- Does installing solar panels impact the value of my home?
- Does solar energy lead to environmental benefits?
Let's convert the solar panel investment decision into a perceptron
model by identifying:
● Inputs (factors)
● Weights (importance of each factor)
● A threshold or bias (cut-off for decision)
● Output:
○ 1 = Invest in solar panels
○ 0 = Do not invest
Step 1: Define the Inputs
Factor Input Variable Value
Sufficient average sunlight in the area x₁ 1 = Yes, 0 = No
Incentives or rebates available for installation x₂ 1 = Yes, 0 = No
Positive impact on home value x₃ 1 = Yes, 0 = No
Environmental benefits from solar energy x₄ 1 = Yes, 0 = No
Step 2: Assign Weights (Reflecting
Importance)
Let’s assign relative importance to each factor:
● w₁ = 4 → Sunlight is crucial for solar panel effectiveness
● w₂ = 3 → Financial incentives significantly affect
decision
● w₃ = 2 → Home value matters but is secondary
● w₄ = 1 → Environmental concern is meaningful but
might not be a dealbreaker
Step 3: Define Threshold (θ) or Bias (b)
Let’s set:
Threshold θ = 5 OR Bias b = -5 (if using the bias version)
Bias form:
Total=4(1)+3(1)+2(0)+1(1)-5=3>=0
Output=1, Then Invest in Solar panels.