Day 16 of 133
Logistic regression + classification metrics + DSA Stack
Cross-entropy, ROC vs PR, calibration, threshold selection.
DSA · NeetCode Stack
- Generate ParenthesesDSA · Stack
Interview questions to prep
- Why a stack here — what LIFO property does the problem exploit?
- If this uses a monotonic stack, state the monotonic invariant and how it's restored on each push.
- Walk through complexity: each element is pushed and popped at most once, so the total work is O(n).
- Daily TemperaturesDSA · Stack
Interview questions to prep
- What's the monotonic-stack invariant, and how does each pop give you the answer?
- Why is the total work O(n) when the inner loop looks O(n²)?
ML · Logistic regression & classification
Interview questions to prep
- Why do we use the log-loss (cross-entropy) instead of MSE for logistic regression?
- Derive the gradient of binary cross-entropy w.r.t. the weights.
Interview questions to prep
- When is ROC-AUC misleading? When should you use PR-AUC instead?
- What is a calibration plot and why does it matter for downstream decisions?
- How do you choose a classification threshold for a fraud-detection system?
Interview questions to prep
- Compare one-vs-rest vs softmax for multi-class classification.
- What's the difference between multi-class and multi-label, and how does the loss change?
Interview questions to prep
- Why is logistic regression called regression if it solves classification?
- How do you interpret a logistic-regression coefficient as an odds ratio?
- When do you use sigmoid outputs vs softmax outputs, and how does that change for multi-label problems?
References & further reading