Evaluate TPR/FPR, sigmoid, and activations
Goldman SachsMachine Learning Engineer · Online AssessmentLast updated
This question evaluates competency in binary classification metrics (confusion matrices, TPR/FPR), basic neural network forward computation (sigmoid neuron z and output), and knowledge of activation function selection and pitfalls.
You have a 70-minute assessment with several ML-fundamentals multiple-choice questions. Answer the following (show calculations where applicable).
1) Confusion matrix vs. TPR/FPR
You are given four candidate confusion matrices (binary classification). For each matrix, rows are Actual and columns are Predicted.
Option A
- TP=80, FN=20, FP=10, TN=90
Option B
- TP=45, FN=5, FP=45, TN=5
Option C
- TP=50, FN=50, FP=5, TN=95
Option D
- TP=90, FN=10, FP=30, TN=70
Target requirements:
- True Positive Rate (TPR / Recall) = 0.80
- False Positive Rate (FPR) = 0.10
Question: Which option(s) satisfy both requirements?
2) Sigmoid neuron calculation
A single neuron computes: [ z = w^\top x + b ] [ \hat{y} = \sigma(z) = \frac{1}{1+e^{-z}} ] Given:
- (w = [0.5, -1.0])
- (x = [2.0, 1.0])
- (b = 0)
Question: Compute (z) and (\hat{y}) (to 3 decimal places).
3) Activation functions
Consider the following activation functions: sigmoid, tanh, ReLU, Leaky ReLU, softmax.
Questions:
- Which activation is most commonly used in the output layer for multi-class single-label classification?
- Give two reasons ReLU-like activations are commonly used in hidden layers of deep networks.
- Name one common pitfall of sigmoid/tanh in deep hidden layers and why it happens.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.