Exam Questions: AI, ML, and Deep Learning — Top 10 Questions with Answers
AI, ML, and Deep Learning — Top 10 Questions with Answers
1. What is the difference between Artificial Intelligence, Machine Learning, and Deep Learning?
Answer:
| Concept | Definition | Example |
|---|---|---|
| Artificial Intelligence (AI) | The broad field that enables machines to mimic human intelligence and decision-making. | Chatbots, game-playing agents |
| Machine Learning (ML) | A subset of AI that enables systems to learn from data and improve without explicit programming. | Spam email classification |
| Deep Learning (DL) | A subset of ML that uses neural networks with many layers to learn complex patterns. | Image recognition, speech translation |
Relation:
Deep Learning ⊂ Machine Learning ⊂ Artificial Intelligence
2. What are the types of Machine Learning? Give examples.
Answer:
| Type | Description | Example |
|---|---|---|
| Supervised Learning | Model learns from labeled data (input → output). | Email spam detection |
| Unsupervised Learning | Model finds patterns in unlabeled data. | Customer segmentation |
| Reinforcement Learning | Agent learns by interacting with environment via rewards/punishments. | Self-driving cars, game bots |
3.What is Overfitting and Underfitting in ML?
Answer:
-
Overfitting: Model performs well on training data but poorly on new/unseen data.
Cause: Too complex model (e.g., deep decision tree).
Solution: Regularization, pruning, dropout, or more data. -
Underfitting: Model is too simple to capture patterns.
Cause: Too few features or linear model on non-linear data.
Solution: Use complex model or feature engineering.
Visualization Tip:
-
Training error ↓ but testing error ↑ → Overfitting
-
Both errors high → Underfitting
4. Explain Bias-Variance Tradeoff.
Answer:
-
Bias: Error due to wrong assumptions (underfitting).
-
Variance: Error due to model sensitivity to small data changes (overfitting).
Goal: Achieve a balance → low bias + low variance → good generalization.
Tradeoff Curve:
As model complexity ↑ ⇒ bias ↓ but variance ↑.
5. What is the difference between Classification and Regression?
| Criteria | Classification | Regression |
|---|---|---|
| Output Type | Categorical (discrete labels) | Continuous (numeric values) |
| Example | Email spam / not spam | Predicting house prices |
| Algorithms | Logistic Regression, SVM, Decision Tree | Linear Regression, Ridge, Lasso |
| Evaluation Metrics | Accuracy, F1-score | MSE, RMSE, R² score |
Answer:
-
Gradient Descent is an optimization algorithm used to minimize loss function by iteratively updating parameters (weights).
Formula:
[
w = w - \eta \frac{\partial L}{\partial w}
]
where
-
( w ): weight
-
( \eta ): learning rate
-
( L ): loss function
Types:
-
Batch Gradient Descent → Uses all data each step
-
Stochastic Gradient Descent (SGD) → One sample at a time
-
Mini-Batch Gradient Descent → Uses small data batches (best in practice)
7. What are Activation Functions in Neural Networks?
Answer:
Activation functions introduce non-linearity in neural networks.
| Function | Formula | Use |
|---|---|---|
| Sigmoid | ( \frac{1}{1+e^{-x}} ) | Binary classification |
| Tanh | ( \frac{e^x - e^{-x}}{e^x + e^{-x}} ) | Normalized outputs |
| ReLU | ( f(x) = \max(0, x) ) | Deep networks (fast convergence) |
| Softmax | ( \frac{e^{x_i}}{\sum e^{x_j}} ) | Multi-class classification |
ReLU is the most commonly used activation function in deep networks.
8. What is a Confusion Matrix and its metrics?
Answer: More👉
Confusion Matrix evaluates classification model performance. More👉
9. What is the difference between CNN and RNN in Deep Learning?
| Feature | CNN (Convolutional Neural Network) | RNN (Recurrent Neural Network) |
|---|---|---|
| Input Type | Spatial data (images) | Sequential data (text, speech) |
| Structure | Convolution + pooling layers | Loops with memory of previous outputs |
| Use Case | Image classification, object detection | Text prediction, translation |
| Example | ResNet, VGGNet | LSTM, GRU |
10. What is Reinforcement Learning and what are its components?
Answer:
Reinforcement Learning (RL) is a learning paradigm where an agent learns by interacting with an environment to achieve a goal.
Main Components:
-
Agent → Learner/decision-maker
-
Environment → External system agent interacts with
-
State (S) → Current situation
-
Action (A) → Choices made by agent
-
Reward (R) → Feedback for actions
Goal: Maximize cumulative rewards over time.
Key Algorithm: Q-Learning
[
Q(s,a) = Q(s,a) + \alpha [R + \gamma \max Q(s',a') - Q(s,a)]
]
Summary
| No. | Topic | Key Concept |
|---|---|---|
| 1 | AI vs ML vs DL | Hierarchical relationship |
| 2 | Types of ML | Supervised, Unsupervised, RL |
| 3 | Overfitting/Underfitting | Model complexity balance |
| 4 | Bias-Variance Tradeoff | Generalization control |
| 5 | Classification vs Regression | Output nature |
| 6 | Gradient Descent | Optimization algorithm |
| 7 | Activation Functions | Non-linearity in NN |
| 8 | Confusion Matrix | Model evaluation |
| 9 | CNN vs RNN | Spatial vs Sequential data |
| 10 | Reinforcement Learning | Reward-based learning |
Comments
Post a Comment