Day 20 of 133
Bagging, Random Forest, boosting intuition + DSA Binary Search finish
Variance reduction vs bias reduction; bagging vs boosting.
DSA · NeetCode Binary Search
- Time Based Key Value StoreDSA · Binary Search
Interview questions to prep
- State your loop invariant precisely — what must be true on every iteration?
- Why does the loop terminate, and how do you avoid infinite loops on the search-space update?
- Walk through edge cases: empty array, target smaller than min, target larger than max, duplicates.
- Median OF Two Sorted ArraysDSA · Binary Search
Interview questions to prep
- Walk through the partition idea: pick i in A, derive j in B from it.
- Why is the binary search on the smaller array, and what's the worst-case complexity?
ML · Ensembles: bagging, RF, boosting
Interview questions to prep
- How does bagging reduce variance? Why doesn't it reduce bias?
- What two extra ingredients does Random Forest add on top of bagging?
- Which Random Forest hyperparameters control tree diversity, and how does out-of-bag validation work?
Interview questions to prep
- Compare bagging vs boosting — what's reduced and how?
- Walk me through how AdaBoost reweights samples after each weak learner.
Interview questions to prep
- When does stacking actually help vs just adding overhead?
- Walk me through how you'd avoid leakage when training a stacked model with k-fold meta-features.
References & further reading
- StatQuest — Statistics & ML playlists ↗YouTube
- scikit-learn user guide ↗scikit-learn