Amazon·Software Engineer·Technical Phone Screen
- Compare L1 and L2 regularization. How do they differ in terms of sparsity, the geometry of their optimization landscapes, and how they handle outliers in the data?
- How do you choose between loss functions like MSE, MAE, logistic loss, and cross-entropy for different regression and classification problems? What are the gradient properties you care about?
- Walk me through PCA: what is it actually optimizing, how do you fit it and then apply it to new data, and how do you decide how many components to keep?
- Explain how Random Forests are built, their bias-variance trade-off, the limitations of impurity-based feature importance, and which hyperparameters matter most.
“I knew the sparsity answer cold (L1 pushes weights to zero, L2 shrinks them evenly) but fumbled when they pushed on the geometry angle.”