Selected questions of AI & ML
16 November 2025 17:06
(a) The field of artificial intelligence involves creating systems that can
perform tasks that typically require human intelligence.
(b) A machine learning model is an algorithm that learns from data and makes
predictions or decisions based on that data.
(c) In supervised learning, the model is trained using labeled data.
(d) The process of adjusting a model's parameters to minimize prediction error
is known as training.
(e) Reinforcement learning involves using feedback from the environment to
learn optimal actions.
(f) The term machine intelligence refers to the ability of a machine to mimic
human cognitive functions.
(g) A convolutional neural network (CNN) is a type of neural network
architecture commonly used for image recognition tasks.
(h) The k-Nearest Neighbors (k-NN) algorithm is a commonly used algorithm
for classification problems.
(i) In clustering, data points are grouped based on their similarity.
(j) Regularization is a technique used to prevent overfitting by simplifying the
model.
(k) In natural language processing, vectorization refers to the process of
converting text into numerical format.
(l) The ROC curve is a method for evaluating the performance of a
classification model using a threshold.
(m) Data splitting refers to the division of data into training and testing sets.
(n) A decision boundary plot is a graphical representation of the decision
boundaries of a classifier.
(o) The PCA (Principal Component Analysis) method is commonly used for
dimensionality reduction.
(p) A confusion matrix provides a summary of prediction results for a
classification model.
(q) The backpropagation algorithm is widely used for training deep learning
models.
(r) Recurrent neural networks (RNNs) are used to process sequential data,
such as time series or text.
(s) A boosting algorithm is an ensemble method that combines multiple weak
learners to create a strong learner.
(t) In reinforcement learning, an agent learns through a system of rewards and
penalties.
(u) Hyperparameter tuning is a technique used to optimize hyperparameters
of a machine learning model.
(v) A Bayesian network is a graphical model that represents relationships
among variables.
Quick Notes Page 1
among variables.
(w) The term overfitting describes the phenomenon when a model performs
well on training data but poorly on unseen data.
(x) In feature selection, feature importance refers to the importance or
relevance of a feature in making predictions.
(y) The gradient descent is a widely used optimization algorithm for training
machine learning models.
(z) In deep learning, the layers of a neural network include input, hidden, and
output layers.
(a) What is artificial intelligence (AI)?
Artificial intelligence (AI) is a field of computer science that focuses on creating
machines capable of performing tasks that normally require human
intelligence. These tasks include reasoning, learning, problem-solving,
understanding language, and recognizing patterns. AI systems use algorithms
and data to make decisions, automate processes, and mimic human cognitive
functions.
(b) How does machine learning (ML) differ from AI?
Machine learning (ML) is a subset of artificial intelligence, whereas AI is the
broader concept of creating intelligent systems. AI includes rule-based
systems, robotics, expert systems, and machine learning, while ML specifically
focuses on algorithms that learn patterns from data. In simple terms, AI aims
to simulate human intelligence, while ML provides the statistical methods that
enable machines to learn and improve automatically from experience.
(c) What are the main types of machine learning?
The main types of machine learning are supervised learning, unsupervised
learning, and reinforcement learning. Supervised learning uses labeled data to
train models for prediction tasks like classification and regression.
Unsupervised learning deals with unlabeled data and focuses on discovering
patterns or groupings, such as clustering. Reinforcement learning involves an
agent learning optimal actions through rewards and penalties from the
environment.
(d) What is supervised learning?
Supervised learning is a machine learning approach where a model is trained
using labeled input-output pairs. The algorithm learns to map inputs to correct
outputs by minimizing prediction error. It is commonly used in tasks like
classification (e.g., spam detection) and regression (e.g., house price
prediction), where the correct answer is already known during training.
(e) What is unsupervised learning?
Unsupervised learning is a method where the model works with unlabeled
data and tries to discover hidden patterns without prior knowledge of the
Quick Notes Page 2
data and tries to discover hidden patterns without prior knowledge of the
output. It is used for tasks such as clustering, where data points are grouped
based on similarity, and dimensionality reduction, which simplifies large
datasets. The goal is to understand the structure or distribution of data.
(f) Can you explain reinforcement learning?
Reinforcement learning is a learning approach where an agent interacts with
an environment and learns by receiving rewards or penalties for its actions.
The agent’s objective is to learn a policy that maximizes cumulative rewards
over time. This method is used in robotics, games like chess and Go, and
autonomous systems where decisions evolve step-by-step.
(g) What is a neural network?
A neural network is a computational model inspired by the structure of the
human brain, consisting of interconnected nodes called neurons. These
neurons are arranged in layers and process information by applying weights
and activation functions. Neural networks learn complex patterns from data
and are widely used in image recognition, speech processing, and many deep
learning applications.
(h) How do deep learning and machine learning differ?
Deep learning is a subset of machine learning that uses neural networks with
many hidden layers, known as deep neural networks. While traditional
machine learning relies more on feature engineering and simpler algorithms,
deep learning automatically extracts features from raw data. Deep learning is
especially powerful for large datasets and complex tasks such as image
classification, NLP, and speech recognition.
(i) What is overfitting in machine learning?
Overfitting occurs when a model learns the training data too closely, including
noise and irrelevant details, resulting in poor performance on new or unseen
data. It means the model has memorized the training set instead of learning
general patterns. Techniques such as regularization, cross-validation, and using
more data help reduce overfitting.
(j) What are training and testing datasets?
Training and testing datasets are two separate parts of a dataset used to
evaluate machine learning models. The training dataset is used to teach the
model by adjusting its parameters, while the testing dataset is used only to
check how well the model performs on unseen data. This separation ensures
that the model is evaluated fairly and prevents overfitting.
(k) What role does data preprocessing play in ML?
Data preprocessing involves cleaning, transforming, and organizing raw data
before feeding it into a machine learning model. It includes tasks such as
Quick Notes Page 3
before feeding it into a machine learning model. It includes tasks such as
handling missing values, normalization, encoding categorical variables, and
removing noise. Proper preprocessing improves model accuracy, speeds up
training, and ensures that the algorithm can correctly interpret the input data.
(l) What is a decision tree?
A decision tree is a supervised learning model that represents decisions in the
form of a hierarchical tree-like structure. It splits data into branches based on
conditions applied to features, leading to final decisions or predictions at the
leaf nodes. Decision trees are simple to understand, interpret, and use for both
classification and regression tasks.
(m) How is natural language processing (NLP) related to AI?
Natural language processing (NLP) is a branch of AI that focuses on enabling
machines to understand, interpret, and generate human language. NLP
combines linguistics, machine learning, and computational techniques to
process text and speech. Applications such as chatbots, sentiment analysis,
translation, and speech recognition are all powered by NLP systems.
(a) What are some common applications of AI?
Artificial intelligence is widely used across multiple industries due to its ability
to automate complex tasks and make intelligent decisions. In healthcare, AI
helps in disease diagnosis, medical imaging, and personalized treatments. In
finance, AI powers fraud detection, credit scoring, and algorithmic trading. In
transportation, AI supports autonomous vehicles, traffic prediction, and route
optimization. Additionally, AI is used in customer service through chatbots, in
education through personalized learning systems, and in entertainment
through recommendation engines like those used by Netflix and YouTube.
(b) What is the Turing Test?
The Turing Test, proposed by Alan Turing in 1950, is a method for determining
whether a machine can exhibit intelligent behavior similar to that of a human.
In the test, a human evaluator engages in a text-based conversation with both
a human and a machine without knowing which is which. If the evaluator
cannot reliably distinguish the machine from the human based on their
responses, the machine is said to have passed the test. The Turing Test is
significant because it evaluates intelligence based on behavior rather than
internal mechanisms.
(c) What is an algorithm in the context of AI?
In AI, an algorithm is a step-by-step computational procedure designed to
solve a specific problem or perform a task. These algorithms process data,
learn patterns, and generate predictions or decisions. Examples include
Quick Notes Page 4
learn patterns, and generate predictions or decisions. Examples include
decision trees, neural networks, search algorithms, optimization methods, and
reinforcement learning strategies. AI algorithms enable machines to analyze
information and adapt over time, forming the basis of intelligent behavior in
applications such as image recognition, natural language processing, and
autonomous systems.
(d) What are support vector machines (SVM)?
Support Vector Machines (SVM) are supervised learning algorithms used for
classification and regression tasks. They work by finding the optimal
hyperplane that best separates data points belonging to different classes. SVM
maximizes the margin between the hyperplane and the nearest data points,
known as support vectors, which ensures better generalization. SVM can also
handle non-linear classification by using kernel functions, such as polynomial
and radial basis function (RBF) kernels, to transform data into higher
dimensions where separation becomes easier.
(e) How do you evaluate the performance of a machine
learning model?
Model performance is evaluated using various metrics depending on the type
of task. For classification, metrics such as accuracy, precision, recall, F1-score,
ROC-AUC, and confusion matrix are commonly used. For regression tasks,
evaluation is done using mean squared error (MSE), mean absolute error
(MAE), and R² score. Additionally, techniques like cross-validation help test
how well a model generalizes to new data. Good evaluation ensures that the
model is reliable, accurate, and not overfitted.
(f) What is cross-validation?
Cross-validation is a technique used to assess how well a machine learning
model will generalize to unseen data. The most common method is k-fold
cross-validation, where the dataset is divided into k equal parts. The model is
trained on k–1 parts and tested on the remaining one, and this process is
repeated k times. The average performance across all folds gives a stable
estimate of model accuracy. Cross-validation helps prevent overfitting and
improves model robustness.
(g) What are some ethical concerns related to AI?
AI raises several ethical concerns that must be addressed responsibly. One
major issue is data privacy, as AI systems often rely on large volumes of
sensitive personal data. Another concern is bias, where AI models may
unintentionally discriminate due to biased training data. Job displacement is
also a concern, as automation may replace certain types of work. Additionally,
misuse of AI in areas such as deepfakes, surveillance, and autonomous
weapons raises safety and security challenges. Ethical AI development requires
Quick Notes Page 5
weapons raises safety and security challenges. Ethical AI development requires
fairness, transparency, and accountability.
(h) How does transfer learning work?
Transfer learning is a technique where a pre-trained model is reused for a new
but related task. Instead of training a model from scratch, which requires large
datasets and long training time, a model trained on a large general dataset—
such as ImageNet—is fine-tuned on a smaller task-specific dataset. The early
layers retain learned features like edges or shapes, while later layers are
adjusted to fit the new problem. This method improves accuracy, reduces
computational cost, and is widely used in computer vision and NLP.
(i) What is a confusion matrix?
A confusion matrix is a tabular representation used to evaluate the
performance of a classification model. It shows the number of correct and
incorrect predictions organized into true positives, true negatives, false
positives, and false negatives. The matrix helps measure performance beyond
simple accuracy by revealing where the model is making errors. Metrics like
precision, recall, F1-score, and specificity can be derived from the confusion
matrix to gain deeper insights into model behavior.
(j) What is the significance of feature selection?
Feature selection is the process of identifying the most important variables
that contribute to a model’s predictive ability. It improves model accuracy by
removing irrelevant or redundant features and reduces overfitting by
simplifying the model. Feature selection also decreases computational cost,
especially for high-dimensional datasets. Techniques such as filter methods,
wrapper methods, and embedded methods are commonly used. Effective
feature selection leads to faster, more reliable, and interpretable models.
(k) What are generative adversarial networks (GANs)?
Generative Adversarial Networks (GANs) are deep learning models composed
of two neural networks: a generator and a discriminator. The generator
creates synthetic data, while the discriminator evaluates whether the data is
real or fake. Both networks compete in a zero-sum game, improving each
other over time. GANs are widely used for generating realistic images, creating
deepfakes, enhancing image resolution, and producing synthetic data. Their
adversarial training makes them powerful tools for generative tasks.
(l) How can AI be used in healthcare?
AI plays a transformative role in healthcare by improving diagnosis, treatment,
and patient care. Machine learning models analyze medical images to detect
diseases such as cancer, tumors, and heart conditions. AI-powered systems
assist doctors by predicting health risks, recommending treatments, and
Quick Notes Page 6
assist doctors by predicting health risks, recommending treatments, and
monitoring patient vitals. Natural language processing helps in automating
medical records and summarizing patient histories. AI is also used in drug
discovery, robotic surgeries, and telemedicine, making healthcare faster and
more accurate.
(m) What is the future potential of AI and machine
learning?
AI and machine learning hold immense future potential across every sector.
They are expected to lead advancements in autonomous vehicles, personalized
medicine, smart cities, and intelligent manufacturing. With growing
computational power and larger datasets, AI systems will become more
accurate, human-like, and capable of solving complex problems. Future AI may
include general intelligence, real-time translation, advanced robotics, and AI-
driven scientific discoveries. As AI continues to evolve, it promises to increase
productivity, improve quality of life, and revolutionize industries worldwide.
(a) Explain the relationship between artificial
intelligence and machine learning. How do they
complement each other, and what are their distinct
roles in the field of computer science?
Artificial Intelligence (AI) and Machine Learning (ML) are closely related areas
within computer science, but they differ in scope, purpose, and functionality.
AI is the broader concept, while ML is a specialized approach used to achieve
AI capabilities.
Artificial Intelligence refers to the development of machines that can perform
tasks that normally require human intelligence. These tasks include decision-
making, reasoning, problem-solving, understanding language, and recognizing
patterns. AI aims to create systems that can act intelligently and autonomously
in a wide range of environments. Examples of AI systems include expert
systems, intelligent robots, natural language processors, and intelligent search
algorithms.
Machine Learning, on the other hand, is a subfield of AI that focuses on
enabling machines to learn from data. Instead of explicitly programming every
rule, ML algorithms automatically identify patterns in data and improve their
performance over time. Machine learning makes AI practical by giving
machines the ability to adapt, improve, and make predictions based on
previous experience. Examples of ML techniques include decision trees, neural
networks, support vector machines, and clustering algorithms.
The relationship between AI and ML can be understood as one of dependency
and enhancement. AI provides the overall goals and principles for building
intelligent systems, while ML supplies the methods and technologies that allow
Quick Notes Page 7
intelligent systems, while ML supplies the methods and technologies that allow
these systems to learn and perform complex tasks. For example, an AI-based
medical diagnosis system requires machine learning methods to analyze
patient data and make accurate predictions.
Although ML is essential for modern AI, not all AI uses ML. Early AI systems
relied on rules, logic, and symbolic reasoning. Similarly, ML can be used in
areas outside AI, such as statistical modeling, forecasting, or recommendation
systems.
Together, AI and ML complement each other by combining intelligent decision-
making with data-driven learning. AI defines the intelligence, while ML
provides the learning ability. Their distinct roles allow computer science to
build advanced systems capable of automation, prediction, and cognitive
behavior in fields like healthcare, transportation, finance, and robotics.
(b) Discuss the various types of machine learning
(supervised, unsupervised, and reinforcement
learning). Provide examples of each type and explain
how they differ in terms of data requirements and
learning processes.
Machine learning can be broadly classified into three major types: supervised
learning, unsupervised learning, and reinforcement learning. Each type differs
in the way data is used, the learning process involved, and the nature of
problems they solve.
1. Supervised Learning
Supervised learning is a type of learning where the model is trained using
labeled data. Each input data point has a corresponding output label, and the
goal of the model is to learn a mapping from inputs to outputs. During training,
the algorithm compares its predictions with the correct labels and adjusts its
parameters to reduce the error. Common supervised learning tasks are
classification and regression.
Examples:
• Classification: Email spam detection where emails are labeled as “spam”
or “not spam.”
• Regression: Predicting house prices based on size, location, and number
of rooms.
Data requirement: Requires large amounts of labeled data.
Learning process: Learns by minimizing error between predicted and
actual outputs.
2. Unsupervised Learning
Unsupervised learning involves training on data that does not have labels. The
goal is to identify hidden structures, patterns, or groupings within the data.
Since the model does not know the correct output, it learns by finding
Quick Notes Page 8
Since the model does not know the correct output, it learns by finding
similarities or differences among data points.
Examples:
• Clustering: Grouping customers into segments based on purchasing
behavior using K-means.
• Dimensionality Reduction: Using PCA to reduce the number of features
while preserving important information.
Data requirement: Uses unlabeled data, which is easier to collect than
labeled data.
Learning process: Learns by capturing the natural structure of data
without external guidance.
3. Reinforcement Learning
Reinforcement learning is a goal-oriented learning method where an agent
interacts with an environment and learns from the consequences of its actions.
The agent receives rewards or penalties and tries to maximize cumulative
reward over time. This type of learning is used for sequential decision-making
problems.
Examples:
• Robotics: A robot learning to walk or navigate by trial and error.
• Games: AI agents mastering games like Chess, Go, or Atari by learning
optimal moves.
Data requirement: Does not require labeled datasets; instead relies on
feedback signals (rewards).
Learning process: Learns through exploration, trial and error, and policy
improvement.
Differences in Learning Processes
Type of Data How It Learns Common Use Cases
ML Needed
Supervise Labeled Minimizes error between Classification,
d data predicted and actual output regression
Unsupervi Unlabeled Identifies patterns and Clustering, anomaly
sed data structures detection
Reinforce Interaction- Learns from rewards and Robotics, games,
ment based penalties autonomous systems
These three types of machine learning together cover a wide range of real-
world problems. Supervised learning helps in prediction tasks, unsupervised
learning reveals hidden structures, and reinforcement learning enables agents
to learn complex decision-making. Their differences in data requirements and
learning strategies make each type suitable for specific applications in AI,
analytics, and automation.
Quick Notes Page 9
(c) Analyze the ethical implications of deploying AI
and machine learning technologies in real-world
applications. What measures can organizations take
to mitigate risks associated with bias, privacy, and
accountability?
The deployment of AI and machine learning technologies in real-world systems
brings significant benefits, but it also raises serious ethical concerns that must
be carefully addressed. These concerns revolve around issues such as
algorithmic bias, privacy invasion, and lack of accountability. Ethical challenges
arise because AI systems often depend on large datasets and complex
algorithms that may contain hidden risks, leading to unfair or harmful
outcomes.
One major ethical implication is bias in AI systems. When training data
contains historical inequalities or skewed distributions, the model may learn
discriminatory patterns. This can have serious effects in areas such as hiring,
lending, criminal justice, and healthcare. For example, an AI-based recruitment
tool may favor certain demographic groups if the training data is biased. Bias
undermines fairness and leads to unequal treatment of individuals or
communities.
Another concern is data privacy. AI systems often require sensitive personal
data, such as medical records, financial information, or location data. If this
data is not properly protected, it may lead to unauthorized access or misuse.
Privacy breaches can expose individuals to identity theft, discrimination, or
unwanted surveillance. The widespread use of AI-powered surveillance
technologies also raises questions about citizens' right to privacy.
A further ethical issue is accountability. AI systems can be highly complex and
may make decisions that are difficult to interpret. When these systems cause
harm—such as incorrect medical predictions or unsafe autonomous vehicle
behavior—it can be unclear who is responsible: the developer, the
organization, or the algorithm itself. Lack of explainability makes it challenging
to audit and regulate AI systems effectively.
To mitigate these risks, organizations must adopt a range of measures. First,
addressing bias requires diverse and representative datasets, regular audits of
AI models, and fairness metrics to detect discriminatory patterns.
Organizations should use techniques such as re-sampling, re-weighting, and
bias-correction algorithms. Ethical guidelines such as "fairness by design"
should be integrated from the early stages of development.
Second, privacy concerns can be mitigated through strong data protection
practices. These include encryption, anonymization, secure data storage, and
strict access controls. Privacy-preserving machine learning techniques such as
federated learning and differential privacy allow AI models to learn from data
without exposing sensitive information. Compliance with standards like GDPR
Quick Notes Page 10
without exposing sensitive information. Compliance with standards like GDPR
can further strengthen privacy protection.
Third, improving accountability requires transparency and explainability in AI
models. Organizations should document model design decisions, maintain logs
of model outputs, and provide explanations for critical decisions. Human
oversight must be included in high-stakes applications to ensure responsible
use. Additionally, establishing clear governance frameworks, ethical review
boards, and impact assessments helps ensure that AI systems remain safe and
trustworthy.
In summary, while AI offers powerful capabilities, its ethical implications must
not be ignored. By focusing on fairness, privacy, and accountability,
organizations can build ethical and responsible AI systems that benefit society
while minimizing risks.
(d) Examine the challenges of data quality and
quantity in machine learning. How do these
challenges impact model performance, and what
strategies can be implemented to ensure the
effectiveness of machine learning systems?
Data quality and quantity are two of the most critical factors that determine
the success of any machine learning model. Poor-quality data or insufficient
data can significantly limit a model’s ability to generalize and make accurate
predictions. These challenges influence every stage of the machine learning
pipeline, from training to evaluation, and can result in unreliable or biased
outcomes.
One major challenge is insufficient data quantity. Machine learning models,
especially complex ones like deep neural networks, require large amounts of
data to learn meaningful patterns. When data is limited, models may fail to
capture underlying relationships and become prone to overfitting, where they
memorize the training data instead of learning general patterns. This leads to
poor performance on unseen data. Conversely, small datasets may also cause
underfitting, where the model is too simple and fails to learn even basic
patterns.
The second challenge is poor data quality, which includes missing values,
incorrect labels, noise, duplication, and inconsistencies. Noisy or inaccurate
data can mislead the learning algorithm, resulting in unstable and
unpredictable model performance. Labeling errors in supervised learning can
significantly degrade accuracy, especially in models that rely heavily on the
correctness of labels. Poor-quality data also increases the risk of biased
outcomes if certain groups are misrepresented or underrepresented.
Data imbalance is another quality-related issue. For example, in medical
diagnosis datasets, positive cases may be far fewer than negative cases.
Imbalanced data can cause models to favor majority classes, leading to
Quick Notes Page 11
Imbalanced data can cause models to favor majority classes, leading to
misleading accuracy metrics and poor sensitivity in detecting minority cases.
These data challenges can affect model performance by reducing accuracy,
increasing bias, and weakening the model’s ability to generalize. High variance
and unstable predictions are commonly observed when models are trained on
unreliable or small datasets.
To address these challenges, organizations and developers can implement a
variety of strategies. For improving data quantity, techniques such as data
augmentation (especially in image and text domains), synthetic data
generation, or transfer learning can help expand the effective dataset size.
Transfer learning allows models to reuse knowledge from large pre-trained
models, reducing dependence on large task-specific datasets.
For improving data quality, data cleaning is essential. This includes removing
duplicates, fixing incorrect entries, handling missing values using imputation
techniques, and resolving inconsistencies. Proper data labeling is also critical;
organizations may use expert annotators or multiple reviewers to ensure high-
quality labels. Automated tools can assist in detecting labeling issues.
To handle imbalanced datasets, methods such as oversampling minority
classes, undersampling majority classes, or using specialized algorithms like
SMOTE (Synthetic Minority Over-sampling Technique) can be applied.
Choosing appropriate evaluation metrics, such as precision, recall, and F1-
score instead of simple accuracy, ensures better assessment of model
performance.
Finally, data preprocessing methods like normalization, standardization, and
feature engineering can significantly improve model effectiveness. A strong
data governance framework and continuous data monitoring also ensure long-
term maintenance of data quality.
In conclusion, overcoming data quality and quantity challenges is essential for
building reliable machine learning systems. By employing robust data
management strategies and advanced techniques, organizations can ensure
that their models achieve high accuracy, fairness, and generalizability in real-
world applications.
(e) Describe the role of neural networks in deep
learning and how they differ from traditional machine
learning algorithms. What advantages do neural
networks offer for complex tasks like image and
speech recognition?
Neural networks form the foundation of deep learning and play a central role
in enabling machines to learn highly complex patterns from large datasets.
Deep learning is essentially the use of neural networks with many hidden
layers, allowing the model to gradually extract higher-level features from raw
data. Neural networks are inspired by the structure of the human brain,
Quick Notes Page 12
data. Neural networks are inspired by the structure of the human brain,
consisting of interconnected neurons that process information through
weighted connections and activation functions.
Unlike traditional machine learning algorithms such as decision trees, SVMs, or
linear regression models, neural networks do not rely heavily on manual
feature engineering. Traditional algorithms usually require carefully
handcrafted features designed by domain experts. For example, in image
recognition, traditional methods needed manually extracted features like
edges, corners, or textures. Neural networks, especially deep neural networks,
automatically learn hierarchical features directly from raw input data. Early
layers learn simple features like edges, while deeper layers learn complex
features such as faces or objects.
The learning process in neural networks is also different: they use
backpropagation and gradient descent to adjust millions of parameters,
whereas traditional ML algorithms typically have far fewer parameters and
simpler optimization processes. Because neural networks can represent highly
non-linear functions, they can model more complex relationships between
input and output.
Neural networks offer several advantages for complex tasks like image and
speech recognition. Convolutional Neural Networks (CNNs) are specifically
designed for images; they can capture spatial relationships, detect patterns
regardless of location, and handle high-dimensional pixel data efficiently. This
makes CNNs extremely accurate for tasks such as facial recognition,
handwriting detection, and medical image analysis.
Similarly, Recurrent Neural Networks (RNNs) and their modern extensions like
LSTMs and GRUs are excellent for speech recognition because they can process
sequential data and remember past information. They capture time
dependencies, making them suitable for audio processing, voice assistants, and
natural language tasks.
The flexibility, scalability, and automatic feature-learning abilities of neural
networks give them significant advantages over traditional ML models. Their
capacity to learn from massive datasets, adapt to complex patterns, and
improve with more data makes them ideal for cutting-edge applications such
as autonomous driving, deepfake generation, video analytics, and advanced
language processing.
(f) Describe Learning from Observations in AI.
Learning from observations is an important concept in artificial intelligence
where an agent acquires knowledge or behavior simply by watching examples
or demonstrations rather than being explicitly taught through rewards or
labeled data. This type of learning is inspired by human and animal learning,
where individuals often learn new skills by observing others perform them. It is
also known as imitation learning or observational learning.
In this approach, the agent receives sequences of observed actions and states
from an expert or a demonstration. Instead of interacting directly with the
Quick Notes Page 13
from an expert or a demonstration. Instead of interacting directly with the
environment or receiving trial-and-error feedback, the agent attempts to
replicate the behavior displayed in the examples. For instance, a robot may
learn how to assemble a toy by watching a human perform the task step by
step.
Learning from observations is valuable when reinforcement learning would be
too costly, dangerous, or time-consuming. For example, training a robot to fly a
drone by trial and error could lead to damage, whereas learning from recorded
demonstrations is much safer. Similarly, in autonomous driving, learning from
millions of hours of recorded expert driving helps machines understand lane
following, braking, or overtaking without risking real-world accidents.
This technique involves several important steps. First, the agent must interpret
and understand the observed behavior. This may include recognizing actions,
identifying objects, and understanding cause–effect relationships. Next, the
agent must model the behavior, often by mapping observed states to
corresponding actions. Machine learning models, such as neural networks or
probabilistic models, are used to generalize from multiple examples. Finally,
the agent must reproduce or imitate the behavior in the environment.
Learning from observations plays a crucial role in robotics, computer vision,
game-playing agents, and interactive systems. It reduces the need for
expensive labeled data, makes training more intuitive, and allows machines to
learn complex behaviors in a more human-like manner. By enabling AI systems
to learn efficiently from demonstrations, observational learning provides a
foundation for building more adaptive, intelligent, and human-aligned artificial
agents.
(g) Describe Decision Trees in AI.
A Decision Tree is a widely used supervised learning technique in artificial
intelligence and machine learning that represents decisions and their possible
outcomes in the form of a hierarchical tree structure. It is used for both
classification and regression tasks. Decision trees mimic human decision-
making by breaking down a complex decision into a series of simpler decisions
based on features of the input data.
A decision tree consists of three major components: root nodes, internal
nodes, and leaf nodes. The root node represents the feature that best splits
the data, while internal nodes represent further decisions based on other
attributes. The leaf nodes represent the final output or class label. The tree is
constructed through a process of recursive partitioning, where the dataset is
repeatedly divided into subsets based on the feature that provides the
strongest separation.
Decision trees use impurity measures such as Gini Index, Entropy, and
Information Gain to determine the best attribute for splitting the data. For
Quick Notes Page 14
Information Gain to determine the best attribute for splitting the data. For
regression trees, measures like mean squared error are used. These metrics
evaluate how “pure” the resulting subsets are—i.e., how similar the data
points in each group become after the split.
One of the main advantages of decision trees is their interpretability. They can
be visualized easily, making it simple for humans to understand how decisions
are made. Unlike neural networks or support vector machines, decision trees
do not act as black boxes; instead, they make their internal decision process
transparent and explainable. Additionally, decision trees can handle categorical
as well as numerical data and require minimal preprocessing.
However, decision trees also have limitations. They are prone to overfitting if
the tree becomes too deep or complex, capturing noise rather than true
patterns. They can also be unstable, as small changes in data may lead to a
completely different tree structure. To overcome these limitations, ensemble
methods such as Random Forests and Gradient Boosting are used, which
combine multiple decision trees to achieve higher accuracy and stability.
Overall, decision trees are powerful tools in AI due to their simplicity,
interpretability, and versatility across various applications such as medical
diagnosis, customer classification, fraud detection, and risk assessment.
(h) What is Neural Network? Describe Multilayer
Neural Network.
A neural network is a computational model inspired by the biological neural
systems of the human brain. It consists of interconnected processing units
called neurons that work together to identify patterns, learn relationships, and
make predictions from data. Neural networks form the backbone of modern AI
and deep learning systems. They are capable of learning complex, non-linear
mappings, making them suitable for tasks such as image recognition, speech
processing, and natural language understanding.
A basic neural network consists of three types of layers: an input layer, one or
more hidden layers, and an output layer. Each neuron receives inputs, applies
a weighted sum with a bias, and passes the result through an activation
function such as ReLU, sigmoid, or tanh. This allows the network to capture
complicated patterns in the data. During training, the weights are adjusted
using algorithms like backpropagation and gradient descent to minimize
prediction errors.
A Multilayer Neural Network (MLP – Multilayer Perceptron) is a neural
network that contains more than one hidden layer between the input and
output layers. The presence of multiple hidden layers enables the network to
learn hierarchical representations of data. For example, in image classification,
the first layer may learn simple edges, the next layer may learn shapes, and
deeper layers may learn objects such as faces or cars.
Multilayer neural networks perform computations through a process known as
forward propagation, where inputs travel through successive layers, and
backward propagation, where error signals travel backward to update weights.
Quick Notes Page 15
backward propagation, where error signals travel backward to update weights.
This two-step learning mechanism allows deep networks to continuously
improve accuracy with more training.
The advantage of multilayer neural networks lies in their capability to
approximate complex functions that traditional machine learning algorithms
cannot model effectively. They automatically extract features from raw data,
reducing the need for manual feature engineering. This makes them extremely
powerful for high-dimensional data such as images, audio signals, and text
sequences.
However, multilayer networks require large amounts of data to train efficiently
and high computational power. They are also less interpretable compared to
simpler models, which makes understanding their internal decision process
difficult.
Despite these challenges, multilayer neural networks remain a fundamental
building block of deep learning and have revolutionized fields such as
computer vision, speech recognition, autonomous vehicles, and natural
language processing.
(i) Describe Reinforcement Learning.
Reinforcement Learning (RL) is a major branch of machine learning in which an
agent learns to make decisions by interacting with an environment. Unlike
supervised learning, where the correct answers are provided as labeled data,
reinforcement learning relies on trial and error. The agent experiments with
different actions, observes the outcomes, and uses rewards and penalties to
improve its behavior over time.
In reinforcement learning, the key components are:
1. Agent – the learner or decision-maker.
2. Environment – everything the agent interacts with.
3. State – the current situation of the agent within the environment.
4. Action – the choices available to the agent.
5. Reward – feedback given by the environment after an action.
6. Policy – the strategy the agent uses to select actions.
7. Value function – long-term expected rewards from a state.
The learning process involves the agent starting in an initial state, selecting an
action according to its policy, and transitioning to a new state where it receives
a reward. Over time, the agent improves its policy to maximize cumulative
rewards. Algorithms such as Q-learning, SARSA, and Deep Reinforcement
Learning (DQN) are commonly used.
Reinforcement learning is especially useful for problems where the
consequences of actions unfold over time. It is used in robotics for navigation
and control, in game-playing AI such as Chess, Go, and Atari games, and in self-
driving cars to learn safe driving strategies. It is also used in recommendation
systems, industrial automation, and resource management.
One of the strengths of reinforcement learning is that it does not require
Quick Notes Page 16
One of the strengths of reinforcement learning is that it does not require
labeled data; instead, it learns directly from experience. However, RL can be
computationally expensive and may require many interactions with the
environment before achieving optimal performance. Safety is also a concern
because the agent may initially take harmful or inefficient actions.
In summary, reinforcement learning enables AI systems to learn autonomously
through experience, making it a powerful method for complex decision-making
tasks where the environment is dynamic and uncertain.
(j) Discuss advantages and disadvantages of Decision
Tree.
Decision trees are popular supervised learning models used for classification
and regression. They offer a simple, intuitive structure resembling a flowchart,
where decisions are made by splitting data based on certain conditions. While
decision trees are widely used due to their interpretability and flexibility, they
also come with several limitations.
Advantages of Decision Trees
1. Easy to understand and interpret
Decision trees visually represent how decisions are made, making them highly
interpretable. Stakeholders and non-technical users can easily understand how
the model reaches its conclusions.
2. No need for feature scaling or normalization
Unlike algorithms such as SVM or KNN, decision trees do not require
normalized or standardized data. They can handle raw data directly without
complex preprocessing.
3. Works with both numerical and categorical data
Decision trees are versatile and can process continuous as well as discrete
features. This makes them suitable for a wide range of applications.
4. Handles nonlinear relationships
Decision trees are capable of modeling complex decision boundaries that
linear models like logistic regression cannot capture.
5. Useful for feature selection
Decision trees naturally rank features based on their ability to split data,
helping identify important variables.
Disadvantages of Decision Trees
1. Prone to overfitting
If not pruned properly, decision trees may grow too deep and capture noise in
the data. Overfitting reduces generalization performance on new data.
2. Unstable performance
Small changes in data may lead to a completely different tree structure. This
instability makes decision trees less reliable for sensitive tasks.
3. Limited accuracy for complex tasks
Quick Notes Page 17
3. Limited accuracy for complex tasks
For datasets with intricate patterns, decision trees may not achieve high
accuracy compared to advanced models like random forests, boosting, or
neural networks.
4. Biased toward dominant features
If some features have many categories or ranges, the tree may favor them
even when they are not truly important.
5. Difficulties with smooth predictions
Decision trees create step-wise decision boundaries, leading to less smooth
and less generalized predictions, especially in regression.
Conclusion
Decision trees are powerful and user-friendly tools, especially valued for their
interpretability and ability to handle diverse data types. However, they must
be used carefully due to their tendency to overfit and instability. Modern
ensemble methods like Random Forests and Gradient Boosted Trees
overcome many of these disadvantages, making them more suitable for high-
performance applications.
(k) What is NLP? What is its use? Describe the NLP
Communication Process.
Natural Language Processing (NLP) is a branch of artificial intelligence that
focuses on enabling computers to understand, interpret, and generate human
language. It combines linguistics, computer science, and machine learning to
process text and speech in a manner similar to how humans communicate. NLP
allows machines to understand not only the words in a sentence, but also the
context, intent, and emotions behind them.
Uses of NLP
NLP has a wide range of applications across various fields. In communication
systems, NLP powers chatbots, virtual assistants, and email filters. In business,
it is used for sentiment analysis, customer feedback processing, document
summarization, and automated report generation. In healthcare, NLP helps
extract useful medical information from patient records and assists in
diagnosis. NLP is also widely used in translation systems like Google Translate,
speech-to-text systems, search engines, grammar checkers, and many other
real-world applications.
Overall, NLP improves human–computer interaction by making machines
understand natural human language without requiring complex programming
commands.
NLP Communication Process
The NLP communication process describes how human language is
transformed into a machine-understandable format and how the system
Quick Notes Page 18
transformed into a machine-understandable format and how the system
generates a meaningful response. The process typically consists of the
following major stages:
1. Text Acquisition (Input Stage)
This is the stage where the raw input is collected. The input can be spoken
language (converted using speech recognition) or typed text. The system
gathers the user’s message and prepares it for processing.
2. Text Preprocessing
Before understanding meaning, the text must be cleaned and organized. This
step includes:
• Tokenization (splitting text into words or sentences)
• Removing stop words (common words like “is”, “the”)
• Stemming and Lemmatization (reducing words to their base form)
• Normalization (cleaning punctuation, converting to lowercase)
Preprocessing ensures that the data is consistent and ready for analysis.
3. Syntactic Analysis (Parsing)
In this stage, the system analyzes the grammatical structure of sentences. It
identifies parts of speech (nouns, verbs, adjectives) and the relationships
between words. Parsing helps the system understand sentence structure.
4. Semantic Analysis (Understanding Meaning)
Semantic analysis focuses on understanding the meaning of the words and
sentences. NLP uses:
• Named Entity Recognition (NER)
• Word Sense Disambiguation
• Semantic role labeling
This helps the system understand what the user is asking.
5. Pragmatic and Contextual Understanding
NLP also considers context, background knowledge, and real-world
understanding. The same sentence may have different meanings depending on
the situation, and NLP tries to capture this deeper meaning.
6. Response Generation
After understanding the input, the system generates a meaningful response
using templates, rules, or machine learning models such as transformers and
LLMs.
7. Output Delivery
Finally, the generated response is delivered back to the user as text or speech.
NLP communication allows smooth interaction between humans and machines
by converting natural language into structured meaning and then generating
appropriate responses.
(l) Describe ANN and its Types.
An Artificial Neural Network (ANN) is a computational model inspired by the
structure and functioning of the human brain. It consists of interconnected
Quick Notes Page 19
structure and functioning of the human brain. It consists of interconnected
processing elements called neurons, which work together to recognize
patterns and solve complex problems. ANNs are widely used in machine
learning, especially for non-linear and high-dimensional tasks such as image
classification, speech recognition, and predictive analytics.
Structure of ANN
An ANN is organized into three main layers:
1. Input Layer – receives raw data.
2. Hidden Layers – perform computations and extract features.
3. Output Layer – generates the final prediction or classification.
Each neuron applies a weighted sum of inputs followed by an activation
function like ReLU, sigmoid, or tanh. Through a process called
backpropagation, the network adjusts its weights to reduce errors and
improve accuracy.
Types of Artificial Neural Networks
1. Single-Layer Perceptron
This is the simplest type of ANN, consisting of only one layer of output neurons
connected directly to the input layer. It can only classify linearly separable
data. Although simple, it laid the foundation for modern neural networks.
2. Multilayer Perceptron (MLP)
An MLP contains one or more hidden layers between input and output. These
hidden layers allow the network to learn complex, non-linear relationships.
MLPs are widely used for tasks such as classification, regression, and pattern
recognition.
3. Convolutional Neural Networks (CNNs)
CNNs are specialized neural networks used mainly for image and video
processing. They contain convolution layers that extract spatial features such
as edges, textures, shapes, and patterns. CNNs greatly outperform traditional
models in tasks like:
• Face recognition
• Handwriting classification
• Medical image analysis
4. Recurrent Neural Networks (RNNs)
RNNs are designed for sequential and time-dependent data such as text,
speech, and time-series signals. They use feedback loops to remember
previous inputs. Variants like LSTMs and GRUs solve long-term dependency
issues and are used in:
• Language modeling
• Speech recognition
• Machine translation
Quick Notes Page 20
5. Radial Basis Function Networks (RBFNs)
These networks use radial basis functions in hidden layers and are effective for
interpolation, regression, and function approximation tasks.
6. Self-Organizing Maps (SOMs)
SOMs are unsupervised neural networks that project high-dimensional data
into low-dimensional maps for visualization. They are helpful in clustering,
pattern discovery, and data exploration.
Conclusion
ANNs provide powerful tools for modeling complex patterns that traditional
algorithms cannot easily capture. Their various types are suited to different
kinds of problems—CNNs for images, RNNs for sequences, MLPs for general
tasks, and SOMs for clustering. Together, they form the backbone of modern
deep learning applications.
a) The field of Artificial Intelligence involves creating systems that can perform
tasks that typically require human intelligence.
(b) An AI agent perceives and acts upon the environment using sensors.
(c) The search algorithm which is similar to minimax but removes branches
that do not affect the final decision is known as alpha-beta pruning.
(d) The decision tree algorithm reaches its destination using branching.
(e) In artificial intelligence, knowledge can be represented as logic.
(f) A model is an algorithm that learns from data and makes predictions or
decisions based on that data.
(g) The process of adjusting a model’s parameters to minimize prediction error
is known as training.
(h) Reinforcement learning involves using feedback from the environment to
learn optimal actions.
(a) What is artificial intelligence (AI)?
Artificial Intelligence (AI) is a branch of computer science that focuses on
building systems capable of performing tasks that normally require human
intelligence. These tasks include reasoning, learning, problem-solving,
perception, and understanding natural language. AI aims to create machines
that can think and act intelligently by interpreting data, adapting to new
situations, and making decisions autonomously. Applications of AI can be seen
in robotics, speech recognition, autonomous vehicles, expert systems, and
virtual assistants.
(b) How does machine learning (ML) differ from AI?
Quick Notes Page 21
(b) How does machine learning (ML) differ from AI?
Machine Learning (ML) is a subset within the broader field of Artificial
Intelligence. AI refers to any technique that enables machines to mimic
human-like intelligence, including rule-based systems, search algorithms, and
logic. ML, however, specifically focuses on enabling machines to learn from
data and improve their performance over time without being explicitly
programmed. While AI covers the overall goal of creating intelligent machines,
ML provides the statistical and computational methods—such as classification,
clustering, and regression—that allow systems to learn patterns from large
datasets.
(c) What is supervised learning?
Supervised learning is a type of machine learning where the model is trained
using labeled data. Each training example consists of input features along with
the correct output (label), and the objective of the model is to learn a mapping
from inputs to outputs. The algorithm evaluates its predictions against the
actual labels and adjusts parameters to reduce error. Supervised learning is
widely used in tasks such as classification (e.g., email spam detection) and
regression (e.g., predicting house prices). It relies heavily on the quality and
quantity of labeled training data.
(d) What is a neural network?
A neural network is a computational model inspired by the structure of the
human brain. It consists of interconnected processing units called neurons
arranged in layers: an input layer, one or more hidden layers, and an output
layer. Each neuron processes input through weighted connections and
activation functions, producing outputs that feed forward to other neurons.
Neural networks can learn complex relationships between data through
training using algorithms like backpropagation. They are widely used for tasks
such as image recognition, speech processing, natural language understanding,
and pattern recognition.
(e) How do deep learning and machine learning
differ?
Deep learning is a specialized subfield of machine learning that uses neural
networks with multiple hidden layers, known as deep neural networks.
Traditional ML often relies on manual feature engineering, where humans
decide which features are important. Deep learning, however, automatically
extracts features from raw data, making it highly effective for complex tasks
such as image classification, speech recognition, and natural language
processing. Deep learning typically requires large datasets and high
computational power, whereas traditional ML models can work with smaller
datasets and simpler structures.
Quick Notes Page 22
datasets and simpler structures.
(f) Explain reinforcement learning.
Reinforcement learning (RL) is a learning approach where an agent interacts
with an environment and learns through trial and error. Instead of using
labeled data, the agent receives rewards or penalties based on its actions. Over
time, it learns a policy—a strategy for choosing actions that maximize
cumulative rewards. RL is used in applications where sequential decision-
making is crucial, such as robotics, game-playing (Chess, Go), autonomous
driving, and industrial control systems. The agent continuously improves its
performance as it gains more experience from the environment.
(g) What is overfitting in machine learning?
Overfitting occurs when a machine learning model learns the training data too
closely, including noise and irrelevant details. As a result, the model performs
very well on training data but poorly on new, unseen data. This happens when
the model is too complex relative to the size or quality of the dataset.
Overfitting reduces generalization ability and leads to unreliable predictions.
Techniques such as cross-validation, regularization, pruning (in decision trees),
and using more training data help prevent overfitting.
(h) What are training and testing datasets?
Training and testing datasets are two separate portions of a dataset used to
develop and evaluate machine learning models.
• Training dataset: Used to teach the model by adjusting its parameters.
The model learns patterns and relationships within this data.
• Testing dataset: Used to evaluate the model’s performance on unseen
data. It helps measure how well the model generalizes beyond what it
learned.
Using both datasets ensures that the model is not overfitted and performs
reliably on real-world inputs.
(i) What role does data preprocessing play in ML?
Data preprocessing is a crucial step in machine learning that prepares raw data
for model training. It includes cleaning data (handling missing values, removing
duplicates), transforming data (normalization, standardization), encoding
categorical variables, and reducing noise. Preprocessing ensures consistency
and improves data quality, which leads to better model accuracy and
performance. It also helps algorithms interpret the data correctly, reduces
training time, and prevents issues such as bias and overfitting.
(j) What is a decision tree?
A decision tree is a supervised learning model used for classification and
Quick Notes Page 23
A decision tree is a supervised learning model used for classification and
regression tasks. It represents decisions in the form of a tree-like structure,
where each internal node corresponds to a feature-based test, each branch
represents an outcome of the test, and each leaf node represents a final
decision or class. Decision trees split data into subsets based on metrics like
Gini index or information gain to maximize purity. They are easy to
understand, interpret, and visualize. However, they can overfit if not properly
pruned. Decision trees are used in fields like finance, healthcare, fraud
detection, and risk analysis.
(a) What is an intelligent agent in AI, and where are
they used?
An intelligent agent in AI is an autonomous entity that perceives its
environment through sensors and acts upon that environment through
actuators to achieve specific goals. It continuously observes changes, makes
decisions based on built-in rules or learned knowledge, and takes actions to
maximize performance. Intelligent agents use AI techniques such as reasoning,
learning, problem-solving, and planning.
Intelligent agents are used in a wide range of applications. In robotics, they
help robots navigate, grasp objects, and interact intelligently. In virtual
assistants like Siri or Alexa, agents interpret user queries and provide
appropriate responses. In autonomous vehicles, intelligent agents make real-
time decisions for steering, braking, and obstacle avoidance. They are also
used in recommendation systems, fraud detection, smart home systems,
gaming, and industrial automation.
(b) Explain about Support Vector Machine (SVM).
Support Vector Machine (SVM) is a supervised machine learning algorithm
used for classification and regression tasks. The main idea of SVM is to find an
optimal decision boundary, called a hyperplane, that separates data points of
different classes with the maximum margin. The “margin” refers to the
distance between the hyperplane and the nearest data points from each class,
known as support vectors.
SVM works well for linearly separable data and can be extended to non-linear
problems using kernel functions such as the polynomial kernel, radial basis
function (RBF), and sigmoid kernel. These kernels transform data into higher
dimensions where separation becomes easier. SVM is powerful because it
avoids overfitting, handles high-dimensional data effectively, and performs
well even with small datasets.
(c) Differentiate between DFS and BFS.
DFS (Depth First Search) BFS (Breadth First Search)
Quick Notes Page 24
DFS (Depth First Search) BFS (Breadth First Search)
Explores as deep as possible into one Explores all nodes at the present depth
branch before backtracking. before moving to the next level.
Uses a stack (either explicit or Uses a queue to store nodes.
recursive).
May find a solution faster in deep Guarantees finding the shortest path in
search spaces. an unweighted graph.
Can get stuck in deep or infinite More memory intensive due to storing
loops. all neighbors.
DFS is best for deep searches, while BFS is best for shortest-path or level-order
searches.
(d) Explain the minimax algorithm along with the
different terms.
The minimax algorithm is a decision-making algorithm used in two-player zero-
sum games such as Tic-Tac-Toe, Chess, and Checkers. It assumes one player
aims to maximize the score (Max player), while the opponent tries to minimize
it (Min player). The algorithm explores all possible game states and selects the
move that leads to the best guaranteed outcome.
Key terms:
• Maximizer: The player who tries to achieve the highest score.
• Minimizer: The opponent who tries to reduce the maximizer’s score.
• Game Tree: A tree representing all possible moves from the current game
state.
• Utility Value: A numerical value representing how good or bad a terminal
state is.
• Depth: Levels of moves in the game tree.
• Backtracking: Values are propagated up the tree to choose the optimal
move.
Minimax ensures optimal gameplay by evaluating all outcomes and choosing
the move with the best guaranteed result.
(e) Differentiate between uninformed search and
informed search.
Uninformed Search Informed Search
Does not use any domain knowledge; Uses heuristics and domain
only uses problem definition. knowledge to guide the search.
Examples: BFS, DFS, Uniform Cost Examples: A*, Greedy Best-First
Search. Search.
Generally slower and less efficient. Faster and more goal-directed.
Explores many unnecessary nodes. Reduces exploration using
Quick Notes Page 25
Explores many unnecessary nodes. Reduces exploration using
heuristics.
Uninformed search is blind, whereas informed search uses estimates to move
closer to the goal efficiently.
(f) Differentiate between propositional logic and first-
order predicate logic.
Propositional Logic First-Order Predicate Logic (FOPL)
Deals with simple true/false Deals with objects, relations, and
statements called propositions. quantifiers.
No quantifiers (∀, ∃). Includes quantifiers like “for all” and
“there exists.”
Less expressive and cannot describe More expressive and can represent
relationships. complex facts.
Example: “It is raining.” Example: “All humans are mortal.” (∀x
Human(x) → Mortal(x))
FOPL is richer and allows modeling of real-world knowledge better than
propositional logic.
(g) Differentiate between supervised and
unsupervised learning.
Supervised Learning Unsupervised Learning
Uses labeled data for training. Uses unlabeled data.
Learns a mapping from input to Discovers hidden patterns or groups in
output. data.
Used for classification and Used for clustering and dimensionality
regression. reduction.
Example: Spam detection. Example: Customer segmentation.
Supervised learning predicts outputs, while unsupervised learning reveals
structure in data.
(h) What is the significance of feature selection?
Feature selection is the process of identifying the most important attributes
that contribute to a model’s predictive performance. It removes irrelevant,
redundant, or noisy features, which helps improve accuracy, reduce
overfitting, and speed up learning. Feature selection also enhances model
interpretability, especially in high-dimensional datasets such as medical or
genomic data. By focusing on meaningful features, it reduces computational
costs and improves generalization on unseen data. Overall, feature selection
plays a critical role in building efficient, reliable, and optimized machine
Quick Notes Page 26
plays a critical role in building efficient, reliable, and optimized machine
learning models.
(i) What is a confusion matrix?
A confusion matrix is a performance evaluation tool used for classification
models. It is a table that compares the model’s predicted classes with the
actual true classes. The matrix contains four main components:
• True Positive (TP): Correctly predicted positive cases
• True Negative (TN): Correctly predicted negative cases
• False Positive (FP): Incorrectly predicted positive cases
• False Negative (FN): Incorrectly predicted negative cases
From the confusion matrix, important metrics like accuracy, precision, recall,
specificity, and F1-score can be calculated. It provides a detailed view of model
performance and highlights where the model is making mistakes.
(j) What are Generative Adversarial Networks
(GANs)?
Generative Adversarial Networks (GANs) are deep learning models consisting
of two neural networks—the generator and the discriminator—that compete
with each other. The generator creates synthetic data, while the discriminator
evaluates whether the data is real (from the training set) or fake (from the
generator). Through this adversarial training, the generator gradually learns to
produce highly realistic outputs.
GANs are widely used for image synthesis, deepfakes, data augmentation,
artwork generation, face aging, and super-resolution imaging. Their ability to
create realistic artificial data makes them powerful, but they also raise
concerns regarding misuse in fake media generation.
4. Define Intelligent Agent. Discuss the Structure of an
Intelligent Agent and the Different Types of Agents.
(Approximately 500 words)
An intelligent agent in Artificial Intelligence is an autonomous entity that
perceives its environment through sensors and acts upon that environment
through actuators to achieve specific goals. An intelligent agent continuously
observes changes in its surroundings, interprets the input, makes decisions,
and performs actions that maximize its performance. These agents exhibit
properties such as autonomy, flexibility, rationality, learning, and goal-oriented
behavior. The primary objective of an intelligent agent is to operate effectively
in dynamic environments with minimal human intervention.
Structure of an Intelligent Agent
The structure of an intelligent agent is based on the agent–environment
interaction model. The essential components include:
Quick Notes Page 27
interaction model. The essential components include:
1. Sensors
Sensors help the agent perceive its environment. For example, a robot uses
cameras, microphones, and proximity sensors; a software agent uses text
input, system logs, or API data.
2. Actuators
Actuators enable the agent to perform actions. Robots use motors and wheels,
while software agents respond through outputs, notifications, or executing
commands.
3. Agent Program
This is the logic or algorithm that maps percepts (input) to actions. It decides
what action to take given a particular situation.
4. Performance Measure
This defines the success criteria of the agent. For example, a vacuum-cleaner
agent's performance measure may be based on cleanliness, time, and energy
consumption.
5. Internal State / Knowledge Base
Some agents maintain internal memory or knowledge about past states, world
models, or learned information to improve decision-making.
Types of Intelligent Agents
Intelligent agents can be classified into five major types, each with increasing
levels of sophistication and capability.
1. Simple Reflex Agents
These agents act only based on the current percept, ignoring history. Their
decisions are rule-based (i.e., if condition then action).
Example: A thermostat that turns heating on or off based on current
temperature.
Limitation: They cannot handle environments requiring memory.
2. Model-Based Reflex Agents
These agents maintain an internal model of the world, allowing them to handle
partially observable environments. They use both current percepts and
internal states to determine actions.
Example: A self-driving car storing information about nearby vehicles and road
conditions.
3. Goal-Based Agents
These agents choose actions based on achieving a specific goal. They evaluate
possible future states and select actions that move them closer to the goal.
Example: Pathfinding agents in GPS systems or robotics.
4. Utility-Based Agents
These agents aim for the best outcome by using a utility function that
measures how desirable a state is. They handle trade-offs and uncertainties to
maximize satisfaction.
Example: A medical diagnosis system choosing the best treatment plan based
on risks and effectiveness.
Quick Notes Page 28
on risks and effectiveness.
5. Learning Agents
Learning agents improve their performance over time through experience.
They include components like a learning element, critic, and performance
element.
Example: AI systems in games (Chess, Go), recommendation engines, or
adaptive robotics.
Intelligent agents form the core of modern AI applications. Their structured
decision-making ability and behavioral models make them essential for
robotics, automation, gaming, and real-time systems.
5. Discuss A Search Algorithm with an Example.*
(Approximately 500 words)
The A* search algorithm is one of the most widely used informed search
strategies in artificial intelligence. It is an extension of the Uniform Cost Search
but includes heuristics to guide the search more efficiently towards the goal.
A* is both complete (always finds a solution if one exists) and optimal (finds
the best solution), provided that the heuristic function is admissible and
consistent.
Working Principle of A* Search
A* evaluates nodes using the function:
[
f(n) = g(n) + h(n)
]
Where:
• g(n) = cost from the start node to node n
• h(n) = heuristic estimate of the cost from n to the goal
• f(n) = total estimated cost of the cheapest solution through n
The algorithm maintains two sets:
1. Open Set: nodes that are yet to be explored
2. Closed Set: nodes already visited
A* always expands the node with the lowest f(n) value.
Algorithm Steps
1. Initialize the open list with the start node and empty closed list.
2. Select the node from the open list with the smallest f(n).
3. If this node is the goal, reconstruct the path and end the search.
4. Otherwise, expand the node, calculate neighbors’ f(n) values, and add
them to the open list.
5. Move the current node to the closed list.
6. Repeat until the goal is reached or no nodes remain.
Heuristic Function (h(n))
The quality of A* depends heavily on the heuristic.
Examples:
Quick Notes Page 29
Examples:
• Manhattan Distance → used in grid navigation
• Euclidean Distance → straight-line path
• Misplaced Tiles → used in 8-puzzle problems
An admissible heuristic never overestimates the cost.
Example of A* Search
Consider the following graph with costs:
A
/ \
B C
/\ /\
D EF G
Goal = G
Let:
• g(n) = actual path cost
• h(n) = estimated cost from node to G
Assume the following values:
Node g(n) h(n)
A 0 5
B 2 4
C 3 2
D 4 6
E 6 5
F 7 4
G 9 0
Compute f(n) = g(n) + h(n):
Node f(n)
A 5
B 6
C 5
D 10
E 11
F 11
G 9
Search Process:
1. Start at A (f = 5).
2. Compare children: B (6) and C (5). Choose C.
3. From C, possible nodes are F and G.
4. Compute f: F (11), G (9).
Quick Notes Page 30
4. Compute f: F (11), G (9).
5. Node G has lowest f, so it is chosen.
6. Goal reached → Optimal path is A → C → G.
Conclusion
A* is powerful because it combines actual cost and heuristic cost, resulting in
fast and optimal solutions. It is widely used in robot navigation, GPS routing,
AI games, pathfinding, and puzzle-solving. When using a good heuristic, A*
becomes extremely efficient and remains one of the most important search
algorithms in artificial intelligence.
6. What is Alpha–Beta Pruning? Explain the Working
Principle of Alpha–Beta Pruning.
(Approximately 500 words)
Alpha–Beta pruning is an optimization technique used in the Minimax
algorithm, which is widely applied in two-player, zero-sum games such as
Chess, Checkers, and Tic-Tac-Toe. The objective of Minimax is to explore the
entire game tree to choose the best possible move. However, exploring every
branch becomes computationally expensive when the search space is large.
Alpha–Beta pruning addresses this issue by eliminating branches of the search
tree that do not influence the final decision, thereby reducing the computation
time significantly without affecting the optimal outcome.
Definition
Alpha–Beta pruning is a search enhancement method that “prunes” or cuts off
branches in the game tree where it is already guaranteed that the move will
not be selected by rational players. In simple terms, it avoids checking moves
that are worse than previously examined ones.
Key Concepts
Understanding Alpha–Beta pruning requires two important values:
• Alpha (α): The highest value achievable by the maximizing player along
the path explored so far.
• Beta (β): The lowest value achievable by the minimizing player along the
path explored so far.
During the search:
• If β ≤ α, it means further exploration along that branch is useless because
the opponent will never choose that option. Hence, the branch is pruned.
Working Principle of Alpha–Beta Pruning
Alpha–Beta pruning works by performing a depth-first search through the
game tree while maintaining the α and β values at each node.
1. Start with initial values
• α = –∞ (worst-case for maximizer)
• β = +∞ (worst-case for minimizer)
2. Traverse game tree in Minimax order
Quick Notes Page 31
2. Traverse game tree in Minimax order
The algorithm alternates between maximizing and minimizing levels.
• At MAX nodes, the algorithm tries to maximize the value.
• At MIN nodes, the algorithm tries to minimize the value.
At every node, the value is updated based on the children.
3. Apply pruning condition (β ≤ α)
• At a MAX node, if the value becomes greater or equal to β, prune the
remaining children.
• At a MIN node, if the value becomes less or equal to α, prune the
remaining children.
This avoids unnecessary comparisons and reduces computation time.
Example
Consider a simplified game tree where the MAX player wants the highest value
and MIN wants the lowest.
Suppose at a MIN node, one branch has already produced the value 4.
While exploring another branch, if MAX produces a value greater than 4, MIN
will never choose that branch because it prefers the lower value. Thus, the rest
of that branch is pruned.
Similarly, in MAX’s turn, if it already has a value like 7 from a branch and a new
branch gives a possible value less than 7, MAX will prune it since MIN will force
it down.
Advantages of Alpha–Beta Pruning
• Reduces the search space significantly.
• Speeds up Minimax without losing accuracy or optimality.
• Allows deeper searches in the same computational time.
• Makes complex games computationally feasible.
Conclusion
Alpha–Beta pruning is an essential enhancement to the Minimax algorithm,
allowing intelligent game-playing agents to evaluate optimal moves efficiently.
By eliminating irrelevant branches, it preserves Minimax accuracy while greatly
improving performance.
7. Discuss Different Techniques for Knowledge
Representation.
(Approximately 500 words)
Knowledge representation (KR) is a fundamental area of artificial intelligence
that aims to store information about the world in a form that machines can
understand and use for reasoning. The purpose of KR is to enable intelligent
systems to solve problems, make decisions, and exhibit intelligent behavior.
Several techniques exist for representing knowledge, each suited for different
types of problems.
Below are the major knowledge representation techniques used in AI:
1. Logical Representation
Quick Notes Page 32
1. Logical Representation
Logical representation uses mathematical logic to express knowledge in a
precise and unambiguous way.
a) Propositional Logic
Represents knowledge using simple true/false statements called propositions.
Example: “It is raining” can be represented as R.
b) First-Order Predicate Logic (FOPL)
More expressive than propositional logic. It includes objects, relations,
functions, and quantifiers such as ∀ (for all) and ∃ (there exists).
Example: “All humans are mortal” → ∀x (Human(x) → Mortal(x))
Logical representation is powerful for formal reasoning but can be rigid and
computationally expensive.
2. Semantic Networks
A semantic network represents knowledge in the form of a graph, where:
• Nodes represent objects or concepts.
• Edges represent relationships between them.
Example:
Dog → is-a → Animal
Semantic networks are intuitive, visually understandable, and useful for
inheritance-based reasoning.
3. Frames
Frames are data structures that represent stereotypical situations or objects. A
frame consists of slots (attributes) and slot values.
Example:
Car Frame
• Type: Sedan
• Engine: Petrol
• Seats: 5
Frames allow easy organization of knowledge but are sometimes inflexible for
dynamic knowledge.
4. Production Rules
Production rules use an IF–THEN format to represent knowledge.
Example:
IF temperature > 100°C THEN water = “boiling”
These rules are useful in expert systems because they provide a clear
procedure for deriving conclusions. However, large rule sets can become
difficult to manage.
5. Ontologies
Ontologies formally define concepts, categories, and relationships within a
specific domain. They provide a shared vocabulary and make knowledge
Quick Notes Page 33
specific domain. They provide a shared vocabulary and make knowledge
reusable and interoperable. They are widely used in semantic web
technologies.
6. Scripts
Scripts are specialized forms of frames used to represent sequences of events
in typical situations.
Example:
Restaurant script: Enter → Order → Eat → Pay → Leave
Scripts help machines understand events and expectations in real-world
scenarios.
Conclusion
Knowledge representation is crucial for enabling AI systems to think, reason,
and solve problems. Techniques such as logic, semantic networks, frames,
rules, and ontologies each offer unique strengths. The choice of KR technique
depends on the complexity of the domain, the type of reasoning needed, and
the structure of information. Together, these methods allow AI systems to
mimic human-like understanding effectively.
8. Discuss General-to-Specific Ordering of Hypothesis.
(Approximately 500 words)
General-to-specific ordering of hypotheses is an important concept in machine
learning, especially in the context of concept learning. It is used to organize
hypotheses based on how general or specific they are in explaining a target
concept. This ordering forms the foundation of algorithms like Candidate
Elimination, Version Space learning, and other inductive learning approaches.
Meaning of General-to-Specific Ordering
A hypothesis h1 is said to be more general than a hypothesis h2 if h1 covers all
the examples that h2 covers, and possibly more. Likewise, h1 is more specific if
it covers fewer examples. For example:
• Hypothesis 1: “All animals are mammals.” (very general)
• Hypothesis 2: “All dogs are mammals.” (more specific)
In machine learning, hypotheses are often represented with constraints on
attributes. A hypothesis with fewer constraints is considered general, while
one with more constraints is specific.
Purpose of Ordering
The main objective of general-to-specific ordering is to systematically organize
hypotheses so that learning can progress efficiently. When new training data is
presented:
• If the current hypothesis is too general, it may classify negative examples
incorrectly.
• If it is too specific, it may fail to classify positive examples correctly.
Quick Notes Page 34
• If it is too specific, it may fail to classify positive examples correctly.
The learner adjusts the hypothesis to find a correct balance.
General-to-Specific Ordering in Version Space
Version Space represents the set of all hypotheses consistent with the training
examples. It is bounded by:
• G-set: The most general hypotheses.
• S-set: The most specific hypotheses.
Learning advances by adjusting these boundaries as new examples appear.
For positive examples:
• The S-boundary (specific boundary) becomes more general.
• The G-boundary remains the same.
For negative examples:
• The G-boundary becomes more specific.
• The S-boundary remains unchanged.
This continuous refinement narrows the hypothesis space, gradually moving
from general toward specific, or vice versa.
Importance in Concept Learning
General-to-specific ordering ensures that:
1. Learning is systematic—the algorithm explores hypotheses in a structured
hierarchy.
2. Search is efficient—irrational jumps in hypothesis space are avoided.
3. Overfitting is minimized—hypotheses refine only when necessary.
4. Ambiguity is reduced—each new example refines the version space.
Example
Consider learning the concept “Fruit is edible.”
Hypothesis examples:
• h1: “All objects are edible.” (most general)
• h2: “All fruits are edible.”
• h3: “Only apples are edible.”
• h4: “Only green apples are edible.” (most specific)
Given positive examples like “banana,” “grape," hypotheses too specific (like
h4) are generalized. Negative examples cause overly general hypotheses (like
h1) to be restricted.
Conclusion
General-to-specific ordering provides a logical structure for exploring
hypothesis space in a controlled and effective way. By moving between these
boundaries, learning algorithms refine their predictions and converge on the
most accurate concept representation. This ordering remains fundamental to
machine learning theory, guiding incremental and consistent hypothesis
refinement.
9. Discuss Decision Tree Learning.
(Approximately 500 words)
Decision tree learning is one of the most widely used methods in machine
learning for classification and regression tasks. It uses a tree-like structure
Quick Notes Page 35
learning for classification and regression tasks. It uses a tree-like structure
where internal nodes represent tests on attributes, branches represent
outcomes of the test, and leaf nodes represent the final class or value. Decision
trees are attractive because they are easy to understand, interpret, and
visualize.
Basic Idea of Decision Tree Learning
Decision tree learning aims to select attributes that best split the dataset into
subsets where each subset is as pure as possible (i.e., contains similar class
labels). The learning process involves recursively partitioning the data until all
leaf nodes become pure or no further meaningful splits can be made.
Key Concepts
1. Root Node
The first attribute chosen for splitting the data.
2. Internal Nodes
Represent attribute tests (e.g., “Temperature > 30°C?”).
3. Leaf Nodes
Represent class labels such as “Yes” or “No,” or numerical predictions.
4. Entropy and Information Gain
○ Entropy: Measures impurity in data.
○ Information Gain: Measures how much uncertainty is reduced after
splitting.
The attribute with the highest information gain is chosen for the split.
5. Gini Index
Another impurity measure used in CART (Classification and Regression
Trees).
Process of Building a Decision Tree
1. Choose the best attribute
Use entropy, information gain, gain ratio, or Gini index.
2. Split the dataset
Partition data according to attribute values.
3. Create child nodes
Recursively repeat the process for each child node.
4. Stop when
○ All examples in a node belong to one class.
○ No more attributes remain.
○ Splitting no longer improves performance.
Advantages of Decision Tree Learning
• Easy to interpret and visualize.
• Works with both numerical and categorical attributes.
• Requires less data preprocessing (no normalization needed).
• Handles non-linear relationships well.
• Fast and efficient for small to medium datasets.
Disadvantages
• Prone to overfitting if not pruned.
• Small changes in data can produce very different trees.
Quick Notes Page 36
• Small changes in data can produce very different trees.
• Greedy splitting may miss optimal trees.
Pruning Methods
Pruning reduces tree size and prevents overfitting using:
• Pre-pruning: Stop early during training.
• Post-pruning: Build full tree, then remove unhelpful branches.
Applications
Decision trees are used in:
• Medical diagnosis
• Fraud detection
• Loan approval
• Customer segmentation
• Weather prediction
• Risk analysis
Conclusion
Decision tree learning is a foundational machine learning method due to its
simplicity, interpretability, and versatility. Although it has limitations like
overfitting and instability, techniques such as pruning or ensemble methods
(Random Forests, Boosting) significantly improve performance. Decision trees
remain a critical tool for both theoretical understanding and practical
applications.
10. Discuss the Basics of Sampling Theory.
(Approximately 500 words)
Sampling Theory is a fundamental concept in statistics and data analysis that
deals with selecting a subset (sample) from a larger group (population) to
estimate characteristics of the entire population. Since studying an entire
population is often costly, time-consuming, or impractical, sampling provides a
scientific way to make valid inferences using only part of the data.
Definition and Importance
Sampling theory provides principles and methods for determining how to
select samples, how large they should be, and how to generalize the results to
the full population. A good sample represents the characteristics of the
population accurately, allowing reliable predictions and conclusions.
Key Terminologies in Sampling Theory
1. Population
The complete group of individuals or items that we want to study.
Example: All voters in a country.
2. Sample
A subset selected from the population for analysis.
Example: 2,000 voters chosen for a survey.
3. Sampling Unit
The element or group of elements considered for selection (person,
household, etc.).
Quick Notes Page 37
household, etc.).
4. Sampling Frame
A list or source that identifies all units in the population, such as voter lists or
customer databases.
5. Parameter and Statistic
• Parameter refers to population characteristics (mean, variance).
• Statistic refers to sample characteristics used to estimate parameters.
Types of Sampling Methods
Sampling methods are broadly classified into two categories:
A. Probability Sampling
Every unit has a known, non-zero chance of being selected. This method allows
strong statistical conclusions.
1. Simple Random Sampling
Units are chosen randomly with equal probability.
Example: Randomly selecting employee IDs from a list.
2. Systematic Sampling
Selecting every k-th item after a random start.
Example: Every 10th visitor to a mall.
3. Stratified Sampling
Population is divided into homogeneous groups (strata), and samples are taken
from each group.
Useful when population has diverse subgroups.
4. Cluster Sampling
Population is divided into clusters (e.g., villages or schools), and entire clusters
are selected randomly.
B. Non-Probability Sampling
The probability of selection is unknown; used when probability sampling is
difficult.
1. Convenience Sampling
Choosing units that are easiest to access.
2. Judgment Sampling
Selection based on the researcher’s judgment.
3. Quota Sampling
Selecting fixed numbers from specific categories.
Sampling Error and Non-Sampling Error
Sampling error arises due to selecting a sample instead of studying the entire
population. It decreases as sample size increases.
Non-sampling errors include bias in questionnaires, data processing mistakes,
or non-response issues.
Applications of Sampling Theory
Quick Notes Page 38
Applications of Sampling Theory
• Polling and election predictions
• Market research
• Quality control in manufacturing
• Medical and scientific research
• Machine learning (training/test split uses sampling concepts)
Conclusion
Sampling theory provides a structured approach for selecting representative
data and making reliable inferences about a larger population. It plays a crucial
role in statistics, data analytics, research, and modern AI-driven decision-
making.
11. Write Short Notes on: i) Adaline Network ii)
Madaline Network
i) Adaline Network (Adaptive Linear Neuron)
(Short Note – 250 words)
ADALINE, introduced by Bernard Widrow and Marcian Hoff in the 1960s,
stands for Adaptive Linear Neuron. It is one of the earliest neural networks
and forms the foundation of many modern learning algorithms. Adaline
consists of a single neuron with multiple weighted inputs and one output. It
uses linear activation instead of a step function, making its learning rule
mathematically stable.
Structure
• Multiple input nodes
• Weighted connections
• A linear combination of inputs
• Output based on a threshold
The network computes:
[
y = w_1x_1 + w_2x_2 + \cdots + w_nx_n + b
]
Learning Rule
Adaline uses the Least Mean Squares (LMS) or Widrow-Hoff rule, which
adjusts weights to minimize the mean squared error between predicted output
and actual target.
[
\Delta w = \eta (t - y)x
]
Characteristics
• Learns through gradient descent
• Works well for linearly separable data
• More stable than perceptron because error is based on continuous output
Quick Notes Page 39
• More stable than perceptron because error is based on continuous output
rather than binary decisions
Applications
• Signal processing
• Adaptive filtering
• Linear classification tasks
Adaline is historically important because it introduced gradient-based learning
that influenced modern neural networks.
ii) Madaline Network (Multiple Adaline)
(Short Note – 250 words)
Madaline (Multiple Adaptive Linear Neurons) is an extension of Adaline
developed by Widrow and Hoff. It is considered one of the first multilayer
neural networks and was the earliest practical network trained for real-world
problems.
Structure
• Consists of several Adaline units arranged in multiple layers
• Typically includes:
○ Input layer
○ Hidden layer of Adaline units
○ Output layer
Unlike Adaline, Madaline can represent more complex decision boundaries
because it uses multiple linear neurons.
Learning Algorithm
Madaline uses the Madaline Rule I (MR-I) and Madaline Rule II (MR-II):
• MR-I uses supervised learning based on LMS.
• MR-II uses a heuristic method to reduce output error by adjusting only
those Adalines that improve performance.
Advantages
• Supported adaptive learning
• Handled noise better than single-layer perceptrons
• Performed useful pattern recognition tasks before backpropagation was
discovered
Applications
• Speech recognition
• Pattern and character recognition
• Control systems
• Adaptive noise cancellation
Madaline marked a significant advancement in neural network research and
paved the way for backpropagation and deep learning.
Quick Notes Page 40
Quick Notes Page 41