✅ Math Interview Questions and Answers for AI Roles 🧠📐
1️⃣ What is the difference between supervised and unsupervised learning from a mathematical perspective?
• Supervised: Learn a function f(x) → y using labeled data
• Unsupervised: Discover hidden patterns or structure in x without labels
• Supervised uses loss functions (e.g., MSE), unsupervised uses clustering, density estimation, etc.
2️⃣ What is the bias-variance tradeoff?
• Bias: Error from wrong assumptions (underfitting)
• Variance: Error from sensitivity to small fluctuations (overfitting)
• Goal: Find a balance to minimize total error
Equation:
Total Error = Bias² + Variance + Irreducible Error
3️⃣ What is the role of eigenvalues and eigenvectors in AI?
• Used in PCA for dimensionality reduction
• Eigenvectors define directions of maximum variance
• Eigenvalues indicate magnitude of variance along those directions
4️⃣ Explain gradient descent.
An optimization algorithm to minimize loss functions.
• Iteratively updates parameters in the direction of negative gradient
Update rule:
θ = θ - α * ∇J(θ)
Where α is the learning rate, ∇J(θ) is the gradient of loss
5️⃣ What is the difference between L1 and L2 regularization?
• L1 (Lasso): Adds |weights| → promotes sparsity
• L2 (Ridge): Adds squared weights → penalizes large weights
Loss with L2:
Loss = MSE + λ * Σw²
6️⃣ What is the softmax function?
Converts logits into probabilities.
Formula:
softmax(xᵢ) = exp(xᵢ) / Σ exp(xⱼ)
Used in multi-class classification (e.g., final layer of neural nets)
7️⃣ What is the difference between convex and non-convex functions?
• Convex: One global minimum, easier to optimize
• Non-convex: Multiple local minima, common in deep learning
8️⃣ What is a confusion matrix?
A table to evaluate classification performance.
• Rows = actual, Columns = predicted
• Metrics: Accuracy, Precision, Recall, F1-score
9️⃣ What is the Central Limit Theorem (CLT)?
• The sampling distribution of the mean approaches a normal distribution as sample size increases
• Foundation for confidence intervals and hypothesis testing
🔟 What is cross-validation and why is it important?
• Technique to assess model generalization
• k-fold CV: Split data into k parts, train on k-1, test on 1
• Reduces overfitting and gives robust performance estimate
💬 Double Tap ♥️ For More 🚀
Post #1736
3.41K
- ❤ 14
- 👍 1