Section A: Definitions and Concepts (15 Marks)
Answer all questions in this section. Each question carries 5 marks.
1. Learning Paradigms:
Explain the differences between supervised learning, unsupervised learning, and
reinforcement learning. Provide one example for each type.
2. CNNs:
Define Convolutional Neural Networks (CNNs), describe their architecture, and explain
their importance in image processing. Provide a real-world application.
3. Data Preprocessing:
Explain the purpose of data preprocessing in machine learning. Discuss two techniques,
such as normalization and dimensionality reduction, and their impact on model
performance.
Section B: Practical Applications (25 Marks)
Answer all questions in this section. Each question carries 5 marks.
1. Linear Regression Code:
Analyze the following Python code:
```python
from sklearn.linear_model import LinearRegression
import numpy as np
# Data
X = np.array([[1], [2], [3], [4], [5]])
y = np.array([1, 2, 1.3, 3.75, 2.25])
# Model
model = LinearRegression()
model.fit(X, y)
# Prediction
print('Prediction for input 6:', model.predict([[6]]))
```
- Explain each line of the code.
- Calculate the predicted value for input 6 and interpret the result.
2. **Search Algorithms:**
Compare Breadth-First Search (BFS) and Depth-First Search (DFS). For each, provide:
- A brief explanation of how the algorithm works.
- A real-world application where it would be most suitable.