Solved Paper Deepanshu
Solved Paper Deepanshu
Boosting combines weak learners sequentially, focusing on mistakes of prior models to reduce bias.
Bagging uses parallel training of models to reduce variance. Boosting can risk overfitting due to
model dependence, while bagging reduces overfitting by training independently. Overfitting occurs
when a model captures noise, and underfitting occurs when it oversimplifies data.
Depth First Search (DFS) explores as deep as possible along branches before backtracking, using less
memory but might not find the shortest path. Breadth First Search (BFS) explores all nodes level by
level, ensuring the shortest path but requiring more memory.
Informed search uses heuristics to guide search towards the goal more efficiently (e.g., A* search),
while uninformed search methods like BFS and DFS explore blindly without heuristics, leading to
slower solutions.
AI refers to machines performing tasks requiring human-like intelligence, such as learning, decision-
making, and problem-solving. Applications include speech recognition, self-driving cars, and fraud
detection in finance.
This algorithm finds a solution by satisfying constraints for each variable in a problem. For example,
solving a Sudoku puzzle involves assigning numbers to grid cells while satisfying row, column, and
region constraints.
Heuristic search uses problem-specific knowledge to prioritize search paths. It helps find solutions
faster than uninformed search. For example, the A* algorithm uses heuristics to balance exploring
paths that seem closest to the goal.
Unit-1
Answer 2(a)(i): Mean-End Analysis (MEA)
Mean-End Analysis (MEA) is a problem-solving method that involves identifying the differences
between the current state and the goal state and then selecting operations to reduce these
differences. It breaks down a complex problem into smaller, more manageable subgoals. For
example, in a robotics application, MEA might first determine the goal (e.g., moving to a specific
location), then create subgoals (e.g., turning, moving forward) to systematically achieve that
outcome. This strategy is often used in planning and decision-making tasks where each step brings
the problem solver closer to the goal.
AI, or Artificial Intelligence, is the broad field concerned with developing machines capable of
intelligent behavior. Machine Learning (ML) is a subset of AI that allows systems to learn from data
and improve their performance over time without explicit programming. Deep Learning (DL) is a
further specialized subset of ML that uses multi-layered neural networks to model complex patterns
in data. For instance, an AI chatbot uses AI for conversation, ML to improve response accuracy based
on feedback, and DL for natural language processing and sentiment analysis by recognizing speech
and text patterns.
A state space is a comprehensive representation of all possible states and actions in a given problem.
It helps in defining the framework for problem-solving by structuring the possible configurations of a
system and its goals. Each state is connected to another through transitions or actions, and a search
algorithm navigates through these states to reach a goal. For example, in the 8-puzzle problem, the
state space consists of every possible arrangement of the puzzle tiles, and the goal is to find the
shortest path from the starting configuration to the goal configuration. State spaces are essential for
planning, scheduling, and navigating in AI applications.
The hill climbing algorithm is a local search technique that continuously moves toward a better
solution by evaluating neighboring states. However, it faces several challenges, including:
• Local Maxima: The algorithm can get stuck at a peak that is not the highest point.
• Plateaus: Flat areas in the search space where no improvement can be seen, causing the
algorithm to stall.
• Ridges: Slopes that are hard to navigate due to gradual improvement in the direction of the
goal.
These problems can be mitigated by techniques like random restarts, which start the algorithm from
different points, or simulated annealing, which occasionally allows worse moves to escape local
maxima.
UNIT-2
Answer 4(a): Importance of Knowledge Representation
Forward reasoning, or forward chaining, begins with the available data and applies inference rules to
deduce new information until a goal is reached. This approach is commonly used in systems where
actions are taken based on real-time data, such as medical diagnosis systems. Backward reasoning,
or backward chaining, starts with a goal and works backward to determine which data or rules
support that goal. It's typically used in systems focused on proving a hypothesis or making decisions
based on an expected outcome, such as legal reasoning or troubleshooting systems. Both methods
are critical in knowledge-based AI systems for different types of problem-solving.
Forward reasoning, also known as data-driven reasoning, begins with known facts and applies rules
to infer new facts until the goal is reached. It's widely used in systems like expert systems for real-
time decision-making, such as medical diagnostics, where symptoms lead to possible diagnoses. On
the other hand, backward reasoning, or goal-driven reasoning, starts with a hypothesis or goal and
works backward to confirm it using known facts. This method is commonly used in theorem proving
or diagnostics, where the goal is identified first, and then evidence is collected to support or refute
the goal.
UNIT-3
Answer 6(a): Bias vs. Variance
Bias and variance are key sources of error in machine learning models. Bias is the error introduced by
simplifying assumptions made by the model. High bias models, such as linear models, may underfit
by failing to capture the complexity of the data. Variance, on the other hand, is the error caused by
the model’s sensitivity to small fluctuations in the training data. High variance models, such as those
involving complex algorithms like deep learning, may overfit the data, capturing noise along with the
signal. Striking a balance between bias and variance is crucial for achieving good generalization in
machine learning models, often managed using techniques like cross-validation.
• Classification: Assigning input data into predefined categories (e.g., email spam detection).
• Clustering: Grouping similar data points together without predefined labels (e.g., customer
segmentation).
Each of these problem types has its own methodologies and applications, depending on the nature
of the data and the desired outcomes.
Answer 7(a): Difference between Least Squares, Total Sum of Squares, and Residual Sum of
Squares
The least squares method minimizes the sum of squared differences between the observed and
predicted values in regression analysis, ensuring the best fit line for the data. The Total Sum of
Squares (TSS) measures the total variation in the observed data. The Residual Sum of Squares (RSS)
represents the variation that remains unexplained by the model. For example, in linear regression,
TSS is the total variation in the target variable, while RSS measures the error between the predicted
values and actual data points, helping evaluate model accuracy.
A confusion matrix is a performance measurement tool for classification models. It displays the
number of true positives (correctly predicted positives), false positives (incorrectly predicted
positives), true negatives (correctly predicted negatives), and false negatives (incorrectly predicted
negatives). For example, in a binary classification problem where a model predicts whether an email
is spam, a confusion matrix helps determine accuracy, precision, recall, and F1 score, offering a
comprehensive view of the model’s effectiveness.
UNIT-4
Answer 8(a): Importance of Dimensionality Reduction
Dimensionality reduction is essential in machine learning for simplifying datasets without losing
valuable information. High-dimensional data, like images or text, can be computationally expensive
to process and prone to overfitting. Techniques like Principal Component Analysis (PCA) or t-SNE
reduce the number of variables by retaining only the most important features. For example, in image
recognition, PCA can reduce pixel data to fewer dimensions, making it easier for models to learn
without sacrificing accuracy. By reducing the "curse of dimensionality," it enhances performance and
generalization.
Answer 8(b): Activation Function
An activation function introduces non-linearity into a neural network, allowing it to model more
complex relationships. Without activation functions, neural networks would behave like linear
models, limiting their capability to solve intricate problems. Common activation functions include:
• Sigmoid: Outputs values between 0 and 1, making it useful for binary classification tasks.
• ReLU (Rectified Linear Unit): Outputs zero for negative inputs and linear for positive inputs,
widely used in deep networks due to its computational efficiency.
These functions are crucial in determining whether neurons in the network should be activated or
not, directly impacting the network's learning ability.
Feed-forward neural networks involve data flowing from the input layer through hidden layers to the
output layer, with no cycles or loops. It is used for making predictions or classifications.
Backpropagation, on the other hand, is the process of adjusting the weights of the network by
propagating the error backward from the output layer to the input layer, using gradient descent to
minimize the loss function. This process helps the network learn and improve. Feed-forward handles
the computation, while backpropagation trains the model, making them complementary processes.
A recommender system predicts user preferences by analyzing historical behavior or user profiles. It
suggests products, services, or content that a user is likely to enjoy, widely used in platforms like
Netflix, Amazon, and Spotify. There are two main types of recommendation systems:
• Content-Based Filtering: Recommends items based on the attributes of items that a user has
liked in the past.
For example, Netflix uses collaborative filtering to recommend shows based on similar user
preferences, while Amazon uses content-based filtering to suggest products based on their features.