0% found this document useful (0 votes)
6 views10 pages

Fam 2023 Winter Micro

The document provides detailed answers to exam questions on various topics related to artificial intelligence, including applications of AI, heuristic search techniques, types of AI agents, multiclass classification, data cleaning techniques, first-order logic, and supervised machine learning algorithms. It also discusses the differences between natural and artificial intelligence, properties of the A* algorithm, the history of machine learning, the need for data preprocessing, and concepts like Bayes' theorem, data analytics vs. data science, overfitting vs. underfitting, and the machine learning life cycle. Additionally, it covers the structure of agents, types of reasoning in AI, and knowledge-based agent architecture.

Uploaded by

ap7265694
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views10 pages

Fam 2023 Winter Micro

The document provides detailed answers to exam questions on various topics related to artificial intelligence, including applications of AI, heuristic search techniques, types of AI agents, multiclass classification, data cleaning techniques, first-order logic, and supervised machine learning algorithms. It also discusses the differences between natural and artificial intelligence, properties of the A* algorithm, the history of machine learning, the need for data preprocessing, and concepts like Bayes' theorem, data analytics vs. data science, overfitting vs. underfitting, and the machine learning life cycle. Additionally, it covers the structure of agents, types of reasoning in AI, and knowledge-based agent architecture.

Uploaded by

ap7265694
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

2023 WINTER

# Detailed Answers to FAM 2023 WINTER Exam Questions


## 1. Attempt any FIVE of the following:
### (a) Applications of AI
AI has numerous applications across various industries:
1. **Healthcare**: Disease diagnosis, drug discovery, personalized treatment plans
2. **Finance**: Fraud detection, algorithmic trading, credit scoring
3. **Retail**: Recommendation systems, inventory management, chatbots
4. **Manufacturing**: Predictive maintenance, quality control, supply chain optimization
5. **Transportation**: Self-driving cars, route optimization, traffic management
6. **Education**: Personalized learning, automated grading, intelligent tutoring systems
7. **Entertainment**: Content recommendation, game AI, deepfake technology
8. **Security**: Facial recognition, anomaly detection, cybersecurity threat detection

### (b) Heuristic Search Techniques


Heuristic search techniques use problem-specific knowledge (heuristics) to find solutions more efficiently
than uninformed searches. Key aspects:
- **Definition**: A heuristic is a rule of thumb that estimates how close a state is to the goal
- **Purpose**: To reduce the search space and find solutions faster
- **Examples**: Greedy best-first search, A* algorithm, hill climbing
- **Characteristics**: Not guaranteed to find optimal solutions, but often finds good solutions quickly
- **Heuristic Function**: Typically denoted as h(n), estimates cost from node n to goal

### (c) Types of AI Agents


1. **Simple Reflex Agents**: React to current percepts using condition-action rules
2. **Model-Based Reflex Agents**: Maintain internal state based on percept history
3. **Goal-Based Agents**: Consider future actions to achieve goals
4. **Utility-Based Agents**: Maximize expected utility/performance measure
5. **Learning Agents**: Improve performance through experience
6. **Hierarchical Agents**: Multiple layers of decision-making
7. **Multi-Agent Systems**: Multiple agents interacting to solve problems

### (d) Multiclass Classification


Multiclass classification is a supervised learning problem where instances are classified into one of three or
more classes. Key points:
- **Difference from Binary**: More than two possible output labels
- **Approaches**:
- Direct methods (algorithms that natively handle multiple classes)
- Reduction to binary (One-vs-Rest, One-vs-One)
- **Algorithms**: Decision trees, random forests, neural networks, k-nearest neighbors
- **Evaluation Metrics**: Confusion matrix, precision/recall per class, overall accuracy
- **Examples**: Handwritten digit recognition (0-9), object classification in images

### (e) Techniques of Data Cleaning


1. **Handling Missing Values**: Imputation (mean, median, mode), deletion
2. **Noise Reduction**: Smoothing (binning, regression), outlier detection
3. **Inconsistent Data**: Standardization (units, formats), validation rules
4. **Duplicate Data**: Identification and removal of duplicate records
5. **Data Transformation**: Normalization, discretization, aggregation
6. **Text Cleaning**: Stopword removal, stemming, lemmatization
7. **Feature Engineering**: Creating new features from existing ones
1
### (f) First-Order Logic
First-order logic (FOL) is a formal system used in mathematics, philosophy, linguistics, and computer
science. Characteristics:
- **Extension of Propositional Logic**: Adds objects, relations, and functions
- **Components**:
- Constants: Represent specific objects
- Variables: Range over objects
- Predicates: Represent relations
- Functions: Represent mappings
- Quantifiers: ∀ (universal), ∃ (existential)
- **Example**: ∀x (Student(x) → ∃y (Book(y) ∧ Reads(x,y)))
- **Advantages**: More expressive than propositional logic for AI knowledge representation

### (g) Supervised Machine Learning Algorithms


1. **Linear Regression**: Predicts continuous values using linear relationships
2. **Logistic Regression**: Binary classification using logistic function
3. **Decision Trees**: Hierarchical structure of decisions based on features
4. **Random Forest**: Ensemble of decision trees for improved accuracy
5. **Support Vector Machines (SVM)**: Finds optimal hyperplane for classification
6. **Naive Bayes**: Probabilistic classifier based on Bayes' theorem
7. **k-Nearest Neighbors (kNN)**: Classifies based on majority vote of nearest neighbors
8. **Neural Networks**: Inspired by biological neurons for complex pattern recognition

## 2. Attempt any THREE of the following:

### (a) Natural vs. Artificial Intelligence


| Aspect | Natural Intelligence (Human) | Artificial Intelligence |
|--------|------------------------------|-------------------------|
| Origin | Biological (brain) | Artificial (computer systems) |
| Learning | From experience, senses | From data, algorithms |
| Processing | Parallel, distributed | Sequential (mostly) |
| Creativity | High (original ideas) | Limited (pattern-based) |
| Energy Efficiency | Highly efficient (~20W) | Less efficient (kW+) |
| Adaptation | Highly adaptable | Domain-specific |
| Common Sense | Innate | Difficult to implement |
| Speed | Slower for calculations | Faster for calculations |
| Consistency | Variable | Highly consistent |
| Emotional Aspect | Present | Absent (currently) |

### (b) Properties of A* Algorithm


1. **Completeness**: Guaranteed to find a solution if one exists (with finite branching factor)
2. **Optimality**: Finds least-cost path when heuristic is admissible (never overestimates)
3. **Admissible Heuristic**: h(n) ≤ h*(n) where h*(n) is true cost to goal
4. **Consistency/Monotonicity**: h(n) ≤ c(n,a,n') + h(n') for all nodes n and successors n'
5. **Best-First**: Expands most promising nodes first (lowest f(n) = g(n) + h(n))
6. **Time Complexity**: Exponential in worst case (O(b^d)), but better with good heuristic
7. **Space Complexity**: Keeps all generated nodes in memory (O(b^d))
8. **Efficiency**: More accurate heuristic → fewer nodes expanded

2
### (c) History and Evolution of ML
1. **1940s-50s**: Foundations (McCulloch-Pitts neuron, Turing's learning machines)
2. **1950s-60s**: Early algorithms (perceptron, nearest neighbor)
3. **1960s-70s**: AI winter due to limitations
4. **1980s**: Revival with backpropagation, decision trees
5. **1990s**: Practical applications (SVM, boosting, web applications)
6. **2000s**: Big data era (ensemble methods, deep learning emerges)
7. **2010s**: Deep learning dominance (AlexNet, transformers)
8. **2020s**: Large language models, multimodal learning
Key milestones: Turing Test (1950), Perceptron (1957), Backpropagation (1986), ImageNet (2012), GPT
(2018+)

### (d) Need for Data Preprocessing


1. **Data Quality Issues**: Real-world data is often incomplete, noisy, inconsistent
2. **Algorithm Requirements**: Many algorithms require clean, normalized data
3. **Performance Improvement**: Better data → better model performance
4. **Dimensionality Reduction**: Handle curse of dimensionality
5. **Feature Engineering**: Create more meaningful representations
6. **Normalization**: Ensure features contribute equally to distance measures
7. **Handling Missing Values**: Prevent bias or algorithm failures
8. **Noise Reduction**: Improve signal-to-noise ratio for learning
9. **Format Standardization**: Ensure consistent data formats
10. **Computational Efficiency**: Reduce processing time and resource usage

## 3. Attempt any THREE of the following:

### (a) Bayes' Theorem


Bayes' Theorem describes the probability of an event based on prior knowledge. Formula:

P(A|B) = [P(B|A) * P(A)] / P(B)

Where:
- P(A|B) = Posterior probability (of A given B)
- P(B|A) = Likelihood (of B given A)
- P(A) = Prior probability of A
- P(B) = Marginal probability of B

**Example**: Medical test with:


- Disease prevalence P(D) = 1%
- Test accuracy P(T|D) = 99%
- False positive P(T|¬D) = 5%

Probability of disease given positive test:


P(D|T) = [P(T|D)*P(D)] / [P(T|D)*P(D) + P(T|¬D)*P(¬D)]
= (0.99*0.01)/(0.99*0.01 + 0.05*0.99) ≈ 16.7%

3
### (b) Data Analytics vs. Data Science
| Aspect | Data Analytics | Data Science |
|--------|----------------|--------------|
| Focus | Analyzing data to answer specific questions | Extracting insights from data using scientific methods |
| Scope | Narrower, focused on business metrics | Broader, includes analytics plus more |
| Techniques | Descriptive statistics, visualization | Machine learning, predictive modeling |
| Goal | Find patterns, support decision-making | Build data products, predictive models |
| Tools | Excel, Tableau, SQL | Python/R, TensorFlow, big data tools |
| Output | Reports, dashboards | Models, algorithms, systems |
| Skills | Business intelligence, SQL | Programming, statistics, ML |
| Data Size | Typically smaller datasets | Often big data |
| Question Types | What happened? Why? | What will happen? How can we make it happen? |

### (c) Overfitting vs. Underfitting


| Characteristic | Overfitting | Underfitting |
|---------------|------------|-------------|
| Definition | Model learns training data too well, including noise | Model fails to learn underlying patterns |
| Training Error | Very low | High |
| Test Error | High | High |
| Model Complexity | Too complex | Too simple |
| Solution Approaches | Regularization, pruning, more data | More features, complex model, longer training |
| Visualization | Wiggly curve passing through all points | Straight line missing patterns |
| Bias-Variance | High variance | High bias |
| Example | Decision tree with too many branches | Linear model for nonlinear problem |

### (d) Unsupervised Algorithm (K-Means)


K-Means clustering partitions data into K clusters. Steps:
1. **Initialization**: Randomly select K centroids
2. **Assignment**: Assign each point to nearest centroid
3. **Update**: Recalculate centroids as mean of assigned points
4. **Repeat**: Until centroids stabilize

Key points:
- Requires predefined K (number of clusters)
- Uses Euclidean distance metric
- Sensitive to initial centroids (solution: k-means++)
- Convergence guaranteed but may be to local optimum
- Applications: Customer segmentation, image compression, anomaly detection

Example with K=2:


1. Randomly place two centroids
2. Assign all points to nearest centroid (creating 2 groups)
3. Move centroids to center of their groups
4. Reassign points based on new centroids
5. Repeat until no more changes

4
## 4. Attempt any THREE of the following:

### (a) Structure of Agents


An AI agent's structure typically includes:
1. **Sensors**: Input devices/percepts (e.g., cameras, microphones)
2. **Effectors**: Output devices/actions (e.g., motors, speakers)
3. **Architecture**: Hardware/software platform
4. **Agent Program**: Implementation of mapping from percepts to actions

Agent program components:


- **Percept Sequence**: History of all perceived inputs
- **Knowledge Base**: Stored information about the environment
- **Decision Making**: Function that maps percepts to actions
- **Learning Mechanism**: Updates behavior based on experience

Types of architectures:
- **Reactive**: Direct percept→action mapping
- **Deliberative**: Maintains internal state and plans
- **Hybrid**: Combines reactive and deliberative approaches

### (b) Heuristic Search Techniques


1. **Best-First Search**: Expands most promising node based on evaluation function
2. **Greedy Best-First**: Uses only heuristic (h(n)) - fast but not optimal
3. **A***: Combines path cost (g(n)) and heuristic (h(n)) - optimal if heuristic is admissible
4. **Iterative Deepening A*** (IDA*): Memory-efficient version of A*
5. **Beam Search**: Expands only top-k nodes at each level
6. **Hill Climbing**: Local search that moves to better neighboring states
- Variants: Stochastic, random-restart, simulated annealing
7. **Genetic Algorithms**: Inspired by biological evolution (selection, crossover, mutation)

### (c) Types of Reasoning in AI


1. **Deductive Reasoning**: From general to specific (valid if premises are true)
- Example: All humans are mortal. Socrates is human. → Socrates is mortal.
2. **Inductive Reasoning**: From specific to general (plausible but not certain)
- Example: The sun rose every day of my life → The sun will rise tomorrow.
3. **Abductive Reasoning**: Inference to best explanation
- Example: The lawn is wet → It probably rained (best explanation)
4. **Common-Sense Reasoning**: Using everyday knowledge
5. **Monotonic Reasoning**: Adding knowledge doesn't invalidate previous conclusions
6. **Non-Monotonic Reasoning**: New information may invalidate previous conclusions
7. **Probabilistic Reasoning**: Using probability theory for uncertain knowledge
8. **Temporal Reasoning**: About time and events

5
### (d) Machine Learning Life Cycle
1. **Problem Definition**: Understand business problem, define objectives
2. **Data Collection**: Gather relevant data from various sources
3. **Data Preparation**:
- Cleaning (missing values, outliers)
- Transformation (normalization, encoding)
- Feature engineering
4. **Exploratory Data Analysis (EDA)**: Understand data through statistics and visualization
5. **Model Selection**: Choose appropriate algorithms based on problem type
6. **Model Training**: Fit models to training data
7. **Model Evaluation**: Assess performance using metrics and validation techniques
8. **Model Tuning**: Optimize hyperparameters for better performance
9. **Model Deployment**: Integrate model into production environment
10. **Monitoring & Maintenance**: Track performance, retrain as needed
11. **Feedback Loop**: Incorporate new data and insights

## 5. Attempt any TWO of the following:

### (a) Hill Climbing and Best Search Algorithm


**Hill Climbing**:
- Local search algorithm that iteratively moves to better neighboring states
- Variants:
- Simple: Move to first better neighbor
- Steepest-ascent: Move to best neighbor
- Stochastic: Randomly select from better neighbors
- Problems:
- Local maxima (solution: random restarts)
- Plateaus (solution: random walks)
- Ridges (solution: multiple moves)

Example: Solving 8-puzzle


1. Evaluate current state (number of misplaced tiles)
2. Generate all possible moves
3. Select move that reduces misplaced tiles most
4. Repeat until no better move exists

**Best-First Search**:
- Expands most promising node based on evaluation function f(n)
- Uses priority queue ordered by f(n)
- Greedy best-first uses f(n) = h(n) (heuristic only)
- A* uses f(n) = g(n) + h(n) (path cost + heuristic)

Example: Pathfinding with A*


1. Start at initial node, calculate f(n) for neighbors
2. Expand node with lowest f(n)
3. For each neighbor, calculate g(n) (path cost) and h(n) (straight-line distance to goal)
4. Continue until goal is reached

6
### (b) Knowledge-Based Agent Architecture
**Architecture**:
1. **Knowledge Base (KB)**: Repository of facts and rules
2. **Inference Engine**: Applies logical rules to KB to deduce new information
3. **Perception**: Translates percepts into KB updates
4. **Action Selection**: Decides actions based on KB state

**Techniques**:
1. **Knowledge Representation**:
- Propositional logic
- First-order logic
- Semantic networks
- Frames
- Ontologies
2. **Reasoning Methods**:
- Forward chaining (data-driven)
- Backward chaining (goal-driven)
- Resolution
- Unification
3. **Learning**:
- Knowledge acquisition
- Rule induction
- Explanation-based learning

Example: Medical diagnosis system


- KB contains symptoms-disease relationships
- Inference engine matches patient symptoms to possible diagnoses
- Can explain reasoning by showing applied rules

### (c) Multiple Linear Regression Implementation


Multiple linear regression models the relationship between multiple independent variables (X) and a
dependent variable (Y):

Y = β₀ + β₁X₁ + β₂X₂ + ... + βₖXₖ + ε

**Implementation Steps**:
1. **Data Preparation**:
- Handle missing values
- Normalize/standardize features
- Split into training/test sets

2. **Model Training**:
- Normal Equation: β = (XᵀX)⁻¹Xᵀy (for small datasets)
- Gradient Descent (for large datasets):
Initialize β's randomly
Repeat until convergence:
Compute predictions ŷ = Xβ
Compute error e = ŷ - y
Update βⱼ = βⱼ - α(1/m)Σ(e·xⱼ) for all j

3. **Evaluation**:
- R² score (coefficient of determination)

7
- Adjusted R²
- MSE, RMSE

Python example using scikit-learn:


```python
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error

# Prepare data
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)

# Create and train model


model = LinearRegression()
model.fit(X_train, y_train)

# Evaluate
predictions = model.predict(X_test)
mse = mean_squared_error(y_test, predictions)
print(f"MSE: {mse}")
print(f"Coefficients: {model.coef_}")
print(f"Intercept: {model.intercept_}")
```

## 6. Attempt any TWO of the following:

### (a) Regression Metrics


1. **Mean Squared Error (MSE)**:
- Formula: MSE = (1/n)Σ(yᵢ - ŷᵢ)²
- Interpretation: Average squared difference between actual and predicted
- Properties: Always non-negative, sensitive to outliers (due to squaring)
- Units: Square of original units

2. **Root Mean Squared Error (RMSE)**:


- Formula: RMSE = √MSE
- Interpretation: Standard deviation of prediction errors
- Properties: Same scale as original data, still sensitive to outliers
- Units: Same as original units

3. **Mean Absolute Error (MAE)**:


- Formula: MAE = (1/n)Σ|yᵢ - ŷᵢ|
- Interpretation: Average absolute difference
- Properties: Robust to outliers, less sensitive than MSE/RMSE
- Units: Same as original units

Comparison:
- MSE/RMSE penalize large errors more heavily
- MAE is more interpretable but less sensitive to bad predictions
- RMSE is preferred when large errors are particularly undesirable

8
### (b) Forms of Data
1. **Structured Data**:
- Tabular data (rows and columns)
- Relational databases
- Spreadsheets
- Example: Customer transaction records

2. **Unstructured Data**:
- No predefined format
- Text documents
- Images, videos
- Audio recordings
- Example: Social media posts

3. **Semi-Structured Data**:
- Not fully relational but has some structure
- JSON, XML files
- Email (structured headers, unstructured body)
- Example: Web logs

4. **Temporal Data**:
- Time-series data
- Timestamped events
- Example: Stock prices over time

5. **Spatial Data**:
- Geographic information
- Maps, GPS coordinates
- Example: Delivery routes

6. **Graph Data**:
- Nodes and edges
- Social networks
- Knowledge graphs
- Example: Facebook friend connections

9
### (c) Beyond Classical Search
Techniques that extend or go beyond traditional search algorithms:

1. **Local Search Algorithms**:


- Operate on single current state rather than multiple paths
- Examples: Hill climbing, simulated annealing, genetic algorithms
- Advantages: Constant memory usage, good for large state spaces

2. **Constraint Satisfaction Problems (CSP)**:


- States defined by variables with constraints
- Backtracking search with constraint propagation
- Examples: Map coloring, Sudoku

3. **Adversarial Search**:
- Game playing with opponents
- Minimax algorithm with alpha-beta pruning
- Examples: Chess, checkers AI

4. **Online Search**:
- For environments where states are discovered during execution
- Examples: Robot exploration, real-time systems

5. **Nondeterministic Search**:
- For environments with uncertainty
- Markov decision processes (MDPs)
- Reinforcement learning approaches

6. **Metaheuristics**:
- High-level strategies for guiding search
- Examples: Tabu search, ant colony optimization, particle swarm optimization

7. **Evolutionary Algorithms**:
- Inspired by biological evolution
- Maintain population of candidate solutions
- Apply selection, crossover, mutation operators

Key differences from classical search:


- Often trade completeness/optimality for efficiency
- Better suited for large or complex state spaces
- May incorporate randomness or probabilistic elements
- Can handle dynamic or partially observable environments

10

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy