Practice
Solution
Step 1: Understand the purpose of each technique
PCA is used for linear dimensionality reduction, UMAP is similar to t-SNE but faster, and LDA is for supervised dimensionality reduction.Step 2: Identify the technique that preserves local structures
t-SNE is specifically designed to preserve local structures in high-dimensional data.Final Answer:
Option A -> Option AQuick Check:
t-SNE for local structures [OK]
Solution
Step 1: Identify the mechanism for vanishing gradient.
LSTMs are specifically designed to handle vanishing gradients by using gating mechanisms.Step 2: Eliminate wrong options.
Dropout (A) is for regularization, Batch Normalization (B) stabilizes learning, and Weight Decay (D) is for preventing overfitting.Final Answer:
Option A -> Option AQuick Check:
LSTM handles vanishing gradients with gates. [check]
import numpy as np
point1 = np.array([1, 2, 3, ..., 1000])
point2 = np.array([2, 3, 4, ..., 1001])
distance = np.linalg.norm(point1 - point2)
print(distance)Solution
Step 1: Calculate the difference between points.
The difference is [1, 1, 1, ..., 1].Step 2: Calculate the Euclidean distance.
The distance is sqrt(1000) = 31.62.Final Answer:
Option D -> Option DQuick Check:
Euclidean distance in high dimensions is sqrt(n). [OK]
Solution
Step 1: Address gradient flow and class imbalance
Batch normalization helps stabilize learning by normalizing inputs to each layer, which can improve gradient flow and model performance.Step 2: Eliminate wrong options
Increase the batch size to include more samples. is incorrect because increasing batch size doesn't directly address gradient flow. Use a sigmoid activation function for all layers. can exacerbate vanishing gradients. Apply dropout to prevent overfitting. is more about regularization than gradient flow.Final Answer:
Option A -> Option AQuick Check:
Batch norm stabilizes learning and gradients. [OK]
Solution
Step 1: Identify the requirements.
Real-time systems require low latency and high throughput.Step 2: Choose the approach that meets these requirements.
Online learning with a streaming framework allows for real-time updates and low latency.Final Answer:
Option A -> Option AQuick Check:
Streaming fits real-time needs. [OK]
