AI ML Solved Question Paper
AI ML Solved Question Paper
:
PA-2564 [Total No. of Pages : 4
[5948]-304
M.C.A. (Management Faculty)
IT - 34 : KNOWLEDGE REPRESENTATION & ARTIFICIAL
INTELLIGENCE : ML, DL
(2020 Pattern) (Semester - III)
Time : 2½ Hours] [Max. Marks : 50
Instructions to the candidates:
1) All questions are compulsory.
2) For MCQ select appropriate choice from options given.
3) From Q2 to Q5 having internal choice.
4) Figure to right indicate full marks
OR
[5948]-304
1. **Domain Knowledge:*A KBS should possess a comprehensive and accurate
knowledge of the specific domain it operates in. The knowledge should be up-to-date
and reflect the expertise of human experts in that field.
3. **Inference Mechanism:** The KBS should have a robust inference engine that can
apply logical reasoning to derive conclusions, make inferences, and solve problems
based on the provided knowledge.
b)Show that “If I look into the sky and I am alert then, I will see a dim
star or if I am not alert then I will not see a dim star” is valid. [6]
--> To show that the given statement "If I look into the sky and I am alert,
then I will see a dim star, or if I am not alert, then I will not see a dim star" is
valid, we can use basic principles of logical deduction. This statement can be
represented using logical symbols and analyzed using propositional logic.
[5948]-304
1. If (P AND Q) -> R
2. If (~Q) -> ~R
So, let's analyze the statement using Modus Ponens for each part:
1. If (P AND Q) -> R
- Assume that both P and Q are true (I look into the sky, and I am alert).
- According to the implication, (P AND Q) -> R, R must be true because
both P and Q are true.
2. If (~Q) -> ~R
- Assume that ~Q is true (I am not alert).
- According to the implication, (~Q) -> ~R, ~R must be true because ~Q is
true (I am not alert).
In both cases, the consequent of each implication (R and ~R) holds true
based on the given assumptions. Therefore, the given statement is valid.
In summary, the statement "If I look into the sky and I am alert, then I will
see a dim star, or if I am not alert, then I will not see a dim star" is valid, as it
follows the rules of logical implication (Modus Ponens) for both parts of the
statement.
[5948]-304
Q3) a)Differentiate between supervised and unsupervised learning. [4]
-->
Supervised Learning Unsupervised Learning
Supervised learning algorithms are trained Unsupervised learning algorithms are trained
using labeled data. using unlabeled data.
Supervised learning model takes direct Unsupervised learning model does not take
feedback to check if it is predicting correct any feedback.
output or not.
Supervised learning model predicts the output. Unsupervised learning model finds the
hidden patterns in data.
In supervised learning, input data is provided to In unsupervised learning, only input data is
the model along with the output. provided to the model.
The goal of supervised learning is to train the The goal of unsupervised learning is to find
model so that it can predict the output when it the hidden patterns and useful insights from
is given new data. the unknown dataset.
Supervised learning needs supervision to train Unsupervised learning does not need any
the model. supervision to train the model.
Supervised learning can be used for those cases Unsupervised learning can be used for those
where we know the input as well as cases where we have only input data and no
corresponding outputs. corresponding output data.
Supervised learning model produces an Unsupervised learning model may give less
accurate result. accurate result as compared to supervised
learning.
Supervised learning is not close to true Artificial Unsupervised learning is more close to the
intelligence as in this, we first train the model true Artificial Intelligence as it learns similarly
for each data, and then only it can predict the as a child learns daily routine things by his
correct output. experiences.
OR
a) State the mathematical formulation of SVM. [5]
--> Support Vector Machines (SVM) are a class of supervised machine learning
[5948]-304
algorithms used for classification and regression analysis. The mathematical
formulation of SVM, specifically for binary classification, can be expressed as
follows:
Input data: A set of feature vectors X = {x1, x2, ..., xn}, where xi represents a feature
vector in n-dimensional space.
Labels: Corresponding binary labels Y = {y1, y2, ..., yn}, where yi is either -1 or 1,
indicating the class to which each data point belongs.
The goal of SVM is to find a hyperplane that maximizes the margin between the two
classes while minimizing classification errors. This hyperplane is represented as:
w*x-b=0
Here, "w" is a weight vector that determines the orientation of the hyperplane, "x" is
the feature vector, and "b" is a bias term that shifts the hyperplane's position. The
margin is the perpendicular distance from the hyperplane to the nearest data point.
SVM aims to find the optimal "w" and "b" values to maximize this margin.
Objective Function:
Maximize the margin (W) while minimizing classification errors:
αi represents the Lagrange multipliers associated with each training data point.
"1" in the constraint represents the margin; the hyperplane must be at least "1" unit
away from each data point on the correct side (yi * (w * xi - b) >= 1).
Solving this optimization problem results in finding the weight vector "w" and bias
term "b" that define the optimal hyperplane, which maximizes the margin while
maintaining correct classification of training data points.
For practical use, the final classification of a test data point is determined by
whether w * x - b is greater or less than zero. If it's greater, the data point is
classified into one class (positive class), and if it's less than zero, it's classified into
the other class (negative class).
b) How SVM can be used for classification of Linearly separable data? [5]
Support Vector Machines (SVMs) are a type of supervised machine learning
algorithm used for classification and regression tasks. When it comes to
linearly separable data, SVMs are particularly effective. Here's a brief overview
of how SVM works for the classification of linearly separable data:
[5948]-304
Evaluate the performance of the model using metrics such as accuracy,
precision, recall, etc.
SVMs are particularly effective when the data is well-separated, and their
ability to maximize the margin makes them robust to outliers. However, for
non-linearly separable data, more advanced techniques like kernel SVMs may
be necessary.
Q4) a)Explain the use of Long Short Term Memory (LSTM). [5]
-->
The key advantage of LSTMs lies in their ability to effectively capture and remember
information over long sequences, which can be challenging for standard RNNs due to
issues like vanishing gradients. The architecture of an LSTM includes memory cells
and various gates that regulate the flow of information.
Cell State (Ct): This represents the long-term memory of the network. It runs straight
down the entire chain of the LSTM, and information can be added or removed from it.
Hidden State (ht): This is the short-term memory or the output at a particular time step.
It is a function of the current input, the previous hidden state, and the current cell
state.
[5948]-304
Input Gate (i), Forget Gate (f), Output Gate (o): These gates control the flow of
information in and out of the memory cell.
Input Gate (i): Determines which values from the input should be updated and added
to the cell state.
Forget Gate (f): Decides what information to discard from the cell state.
Output Gate (o): Determines the next hidden state based on the current input,
previous hidden state, and current cell state.
The computations within these gates are controlled by activation functions, typically
the sigmoid function for input, forget, and output gates, and the hyperbolic tangent
(tanh) function for the cell state and hidden state.
The LSTM architecture allows the network to learn when to remember, forget, or
output information, making it well-suited for tasks where understanding long-term
dependencies is . In natural language processing, for example, LSTMs have been
successfully applied to tasks like language modeling, machine translation, and
sentiment analysis. In time-series prediction, LSTMs can capture patterns and
dependencies over extended periods, making them effective for tasks such as stock
price forecasting or weather prediction.
[5948]-304
b)Why do we use pooling layers in CNN. [5]
--> Pooling layers are used in Convolutional Neural Networks (CNNs) for several important
reasons:
1. **Dimensionality Reduction**: Pooling layers help reduce the spatial dimensions (width
and height) of the feature maps while retaining the essential information. By downsampling
the feature maps, the computational cost of the network is reduced, and overfitting is
mitigated, as there are fewer parameters to learn.
3. **Increased Receptive Field**: Pooling effectively enlarges the receptive field of each
unit in the subsequent layer. A larger receptive field allows the network to capture more
global patterns and relationships in the data. This is particularly valuable for recognizing
high-level features.
4. **Noise Reduction**: Pooling can reduce noise in the feature maps. By taking the
maximum or average value within a local region, the network becomes less sensitive to
minor variations and noise in the data, enhancing its robustness.
OR
[5948]-304
1. **Computer Vision**:
- **Image Classification**: Deep learning is widely used for image classification
tasks, such as recognizing objects, animals, or people in images. Convolutional
Neural Networks (CNNs) are commonly employed for this purpose.
- **Object Detection**: Deep learning models can identify and locate objects
within images, making them valuable for applications like autonomous vehicles,
security surveillance, and image-based search engines.
- **Facial Recognition**: Deep learning is used in facial recognition systems for
identity verification and access control.
- **Image Generation**: Generative Adversarial Networks (GANs) and other
deep learning models can generate realistic images, which have applications in art,
entertainment, and data augmentation for training datasets.
3. **Speech Recognition**:
- Deep learning is used for automatic speech recognition (ASR) systems, making
voice-controlled devices and transcription services more accurate and accessible.
4. **Recommendation Systems**:
- Deep learning models are used to power recommendation engines for platforms
like Netflix and Amazon, helping users discover content and products that match
their preferences.
5. **Healthcare**:
[5948]-304
- Deep learning is employed for medical image analysis, including the detection
of diseases like cancer, the segmentation of organs in medical images, and the
interpretation of radiological scans.
- Predictive Analytics: Deep learning models can predict patient outcomes and
disease progression, assisting healthcare professionals in making informed
decisions.
6. **Autonomous Vehicles**:
- Deep learning is a key technology for self-driving cars, enabling them to
perceive and interpret their environment, detect obstacles, and make driving
decisions.
7. **Finance**:
- Deep learning models are used for algorithmic trading, fraud detection, credit
risk assessment, and financial forecasting.
10. **Gaming**:
- Deep learning is used in game development for character animation,
procedural content generation, and game testing.
[5948]-304
b) Why we need Back propagation? Explain Back propagation algorithm.[6]
--> Backpropagation (short for "backward propagation of errors") is a fundamental
algorithm in training artificial neural networks, particularly feedforward neural
networks and deep learning models. It is used to update the model's weights so
that the network can learn from data and improve its performance in various
tasks. Here's why backpropagation is necessary and an explanation of the
algorithm:
3. **Deep Learning**: In deep learning, neural networks often have many layers
and millions of parameters. Backpropagation is essential for efficiently
propagating the errors backward through these layers to update the weights.
**Backpropagation Algorithm**:
The backpropagation algorithm consists of two main phases: the forward pass and
the backward pass.
1. **Forward Pass**:
- The input data is passed through the network, layer by layer, from the input layer
to the output layer.
- Neurons in each layer calculate their weighted sum of inputs and apply an
[5948]-304
activation function to produce the layer's output.
- These outputs are compared to the expected outputs (ground truth) to compute an
error or loss measure that quantifies the difference between the network's
predictions and the true values.
5. **Computer Vision**:
- **Image and Video Analysis**: AI can identify objects, faces, and scenes in
images and videos, with applications in surveillance, image recognition, and
content tagging.
- **Medical Imaging**: AI assists in interpreting medical images like X-rays,
MRIs, and CT scans.
6. **E-commerce**:
- **Recommendation Systems**: AI recommends products and services to users
based on their preferences and behavior, increasing sales and customer satisfaction.
- **Dynamic Pricing**: AI adjusts prices in real-time based on demand and
market conditions.
7. **Manufacturing**:
- **Predictive Maintenance**: AI forecasts when machines and equipment need
maintenance, reducing downtime and costs.
- **Quality Control**: AI is used to identify defects and maintain product
[5948]-304
quality on the production line.
- **Supply Chain Optimization**: AI optimizes inventory management and
logistics to improve efficiency.
8. **Education**:
- **Personalized Learning**: AI tailors educational content and assessments to
individual students' strengths and weaknesses.
- **Automated Grading**: AI can grade assignments and tests, saving educators
time and providing faster feedback.
9. **Robotics**:
- **Industrial Robots**: AI-powered robots are used in manufacturing for tasks
like assembly, welding, and material handling.
- **Service Robots**: AI-driven robots assist in healthcare, elder care, and
household chores.
10. **Agriculture**:
- **Precision Agriculture**: AI helps farmers optimize crop management,
irrigation, and pest control for increased yields and reduced resource usage.
b) LSTM
--> **Long Short-Term Memory (LSTM)**
- **Forget Gate**: The forget gate decides which information from the previous
time step should be retained in the cell state and which should be discarded.
- **Input Gate**: The input gate determines which new information is added to
the cell state.
- **Output Gate**: The output gate controls which information from the cell state
is used to produce the output at the current time step.
c) NLP
--> **Natural Language Processing (NLP)**
d) Data Center
--> **Data Center**
- **Components**:
- **Servers**: Data centers house numerous servers, which are powerful
computers that handle various tasks, from web hosting to data processing.
- **Networking Equipment**: Routers, switches, and other network devices
facilitate data transmission within and outside the data center.
- **Storage Systems**: Data centers use large-scale storage solutions like Network
Attached Storage (NAS) or Storage Area Networks (SAN) to store vast
amounts of data.
- **Cooling and Ventilation**: Data centers are equipped with advanced cooling
systems to maintain optimal operating temperatures for servers and networking
equipment.
[5948]-304
e) Training data and Testing data
--> Training Data:
Definition: Testing data is a separate subset of the dataset that is not used during
model training. It contains input features but lacks the corresponding target
values.
Purpose: The main purpose of testing data is to evaluate the model's performance
and assess how well it generalizes to new, unseen data.
Usage: The trained model is tested on the testing data to make predictions, and the
model's predictions are compared with the true target values to measure its
accuracy and effectiveness.
Training data and testing data are crucial components of the machine learning
workflow, helping to ensure that models learn from data effectively and can
generalize their predictions to new, real-world scenarios.
OR
a) Listout type of AI
--> 1)Artificial Narrow Intelligence: AI designed to complete very specific
actions; unable to independently learn.
2) Artificial General Intelligence: AI designed to learn, think and perform at
similar levels to humans.
3) Artificial Superintelligence: AI able to surpass the knowledge and
[5948]-304
capabilities of humans.
4) Reactive Machines: AI capable of responding to external stimuli in real
time; unable to build memory or store information for future.
5) Limited Memory: AI that can store knowledge and use it to learn and train
for future tasks.
6) Theory of Mind: AI that can sense and respond to human emotions, plus
perform the tasks of limited memory machines.
7) Self-aware: AI that can recognize others’ emotions, plus has sense of self
and human-level intelligence; the final stage of AI.
c) Building Block of DL
A fundamental building block of Deep Learning (DL) is the **Artificial Neural Network
(ANN)**. ANNs are the basis for many deep learning models and architectures, including
feedforward neural networks, convolutional neural networks (CNNs), and recurrent neural
networks (RNNs). These networks are composed of layers of interconnected artificial neurons that
are designed to mimic the human brain's information processing capabilities. They serve as the
foundation for a wide range of DL applications, from image recognition to natural language
processing.
d) CPU
--> Central Processing Units (CPUs) are essential components in the field of
machine learning. Here's a short note on the role of CPUs in machine learning:
Training and Inference: CPUs are used in both the training and inference phases of
machine learning models. During training, CPUs are responsible for processing and
optimizing large datasets and model parameters. In the inference phase, they execute the
[5948]-304
trained model to make predictions on new data.
Versatility: CPUs are versatile and can handle a wide range of machine learning tasks.
They are suitable for various algorithms, including linear models, decision trees, and
simple neural networks.
e) Chat bot
--> A chatbot is a computer program designed to engage in text-based or voice-based
conversations with users, simulating human-like interactions. These automated agents
use artificial intelligence (AI) and natural language processing (NLP) to understand
and respond to user queries. Chatbots find applications in customer support, virtual
assistants, e-commerce, and various other domains. They offer 24/7 availability,
scalability, and efficiency but may face challenges related to understanding complex
queries and user privacy.
[5948]-304