Explain Core ML Fundamentals
Company: LinkedIn
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: medium
Interview Round: Technical Screen
Answer the following machine learning fundamentals questions:
1. **Logistic Regression**
- Why is logistic regression suitable for binary classification?
- Why can its output be interpreted as a probability?
2. **Loss Function**
- What loss function is commonly used for logistic regression?
- Why is that loss function appropriate?
3. **Gradient Descent**
- Compare batch gradient descent and stochastic gradient descent.
- What are the main differences, advantages, and disadvantages of each?
- Is a larger batch size always better? Why or why not?
- In your explanation, address compute efficiency, convergence behavior, gradient noise, and generalization.
4. **Overfitting and Underfitting**
- What is overfitting? What is underfitting?
- How can you tell which one is happening?
- How can overfitting be reduced?
- Explain the difference between L1 and L2 regularization, including when each is useful and how they affect sparsity and coefficient shrinkage.
5. **Decision Trees**
- In a classification tree, must the output of a leaf node always be exactly 0 or 1?
- Compare two trees:
- Model A: each leaf contains only one training sample.
- Model B: each leaf contains multiple training samples.
- Which model is more likely to overfit, and why?
Quick Answer: This question evaluates foundational machine learning competencies including binary classification and probabilistic model interpretation (logistic regression), classification loss functions, optimization methods (batch vs stochastic gradient descent), regularization and bias–variance trade-offs, and decision tree behavior.