Practice
import numpy as np
features = np.array([1, 2, 3, 4])
normalized = (features - np.mean(features)) / np.std(features)
print(normalized)Solution
Step 1: Understand the normalization process.
Normalization involves subtracting the mean and dividing by the standard deviation.Step 2: Calculate the mean and standard deviation.
Mean = 2.5, Standard deviation = 1.1180.Step 3: Apply normalization.
Normalized values are [-1.5, -0.5, 0.5, 1.5].Final Answer:
Option A -> Option AQuick Check:
Normalize: subtract mean, divide by std. [OK]
Solution
Step 1: Analyze pooling impact
Without pooling, feature maps remain large, increasing model complexity and risk of overfitting.Step 2: Eliminate wrong options
Pooling layers are too aggressive, losing important features is incorrect because aggressive pooling would reduce overfitting. Pooling layers are applied after every convolutional layer is incorrect as regular pooling helps reduce overfitting. Pooling layers use a large stride, reducing model complexity is incorrect because large strides reduce complexity, not increase it.Final Answer:
Option B -> Option BQuick Check:
No pooling increases overfitting risk. [OK]
Solution
Step 1: Identify the constraint
Gradient Descent is more suitable for large datasets that don't fit in memory because it can process data in batches.Step 2: Eliminate wrong options
Least Squares is efficient for small datasets (A), interpretability is not a deciding factor (C), and noise handling depends on regularization, not the optimization method (D).Final Answer:
Option C -> Option CQuick Check:
Gradient Descent handles large datasets in batches. [OK]
Solution
Step 1: Consider latency and vanishing gradient.
GRUs are simpler and faster, reducing latency while handling vanishing gradients.Step 2: Evaluate other options.
Deep LSTM (A) increases latency, standard RNN (C) struggles with gradients, bidirectional LSTM (D) adds complexity and latency.Final Answer:
Option B -> Option BQuick Check:
GRU: fast, handles vanishing gradients. [check]
Solution
Step 1: Consider the need for adaptability.
Fraud patterns change over time, requiring a system that can learn and adapt.Step 2: Evaluate the options for adaptability.
Only a machine learning model that can be retrained offers the necessary adaptability.Final Answer:
Option D -> Option DQuick Check:
ML adapts, rules are static. [OK]
