Topics/Machine Learning

Machine Learning

154 articles

Statistical Models, Deep Learning & AI Systems

Machine Learning covers algorithms that learn patterns from data. From classical statistical models to modern Large Language Models (LLMs), ML powers modern intelligent software.

Level: Intermediate to Advanced
7 Core Subtopics

Track Curriculum

Subtopics & Modules

7 Modules Available
Module 01
3 Q&A
Beginner

Supervised Learning

Linear & Logistic Regression, Decision Trees, Random Forests, SVM, and evaluation metrics.

20 min readStart Guide
Module 02
3 Q&A
Intermediate

Unsupervised Learning

K-Means clustering, Principal Component Analysis (PCA), hierarchical clustering, and t-SNE.

22 min readStart Guide
Module 03
3 Q&A
Advanced

Neural Networks & Deep Learning

Perceptrons, backpropagation, activation functions (ReLU, Sigmoid), PyTorch, and gradient descent.

30 min readStart Guide
Module 04
3 Q&A
Intermediate

Natural Language Processing (NLP)

Tokenization, TF-IDF, Word2Vec embeddings, RNNs, LSTMs, and sentiment analysis.

24 min readStart Guide
Module 05
3 Q&A
Advanced

Computer Vision & CNNs

Convolutions, pooling layers, ResNet, object detection (YOLO), and image segmentation.

26 min readStart Guide
Module 06
3 Q&A
Advanced

Transformers & LLMs

Self-Attention mechanism, Scaled Dot-Product, BERT, GPT, Fine-tuning, LoRA, and RAG.

35 min readStart Guide
Module 07
3 Q&A
Advanced

Model Deployment & MLOps

Model quantization, ONNX, Triton inference server, MLflow tracking, and drift monitoring.

25 min readStart Guide
Track Question Bank
21 Questions Across Modules

Interview Questions by Module Topic

Select a module to view its related questions, or explore all modules organized by seniority level

Filter by Module Topic:
01
Module Topic•3 Questions under this topic

Supervised Learning

Full Guide & Mechanics

What is the Bias-Variance tradeoff, and how do overfitting and underfitting manifest in training vs validation loss curves?

In-Depth Technical Answer

The Bias-Variance tradeoff defines a fundamental tension in supervised machine learning. Expected test error decomposes into three additive components: Error = Bias² + Variance + Irreducible Error. Bias measures the error originating from overly simplistic assumptions in the learning algorithm. High bias causes underfitting: the model fails to capture complex underlying relationships in the data. Both training loss and validation loss remain high and stagnate early. Variance measures the model's sensitivity to random fluctuations and noise in the training set. High variance causes overfitting: the model memorizes idiosyncratic noise rather than generalizable signals. In loss curves, training loss drops monotonically toward zero, while validation loss bottoms out and begins diverging upward. The optimal model minimizes total generalization error at the inflection point where validation loss reaches its minimum before variance drives it upward.

Practical Code Examplebias_variance_diagnosis.py
Python
import numpy as np

def compute_loss_curves(X_train, y_train, X_val, y_val, max_degrees=10):
    train_errors = []
    val_errors = []

    for degree in range(1, max_degrees + 1):
        # Generate polynomial feature expansion
        poly_train = np.vander(X_train, degree + 1, increasing=True)
        poly_val = np.vander(X_val, degree + 1, increasing=True)

        # Fit least squares weights using Normal Equation
        weights = np.linalg.pinv(poly_train) @ y_train

        # Compute Mean Squared Error (MSE)
        train_mse = np.mean((poly_train @ weights - y_train) ** 2)
        val_mse = np.mean((poly_val @ weights - y_val) ** 2)

        train_errors.append(train_mse)
        val_errors.append(val_mse)

    # Detect optimal degree minimizing validation error
    best_degree = np.argmin(val_errors) + 1
    return {
        "best_degree": best_degree,
        "train_errors": train_errors,
        "val_errors": val_errors
    }

🔍 Code Mechanics (Python): 1. Sweeps polynomial model capacity from low degree (high bias) to high degree (high variance). 2. Computes train and validation MSE for each model capacity. 3. Diagnoses overfitting where training loss continues decreasing while validation loss diverges upward. 4. Identifies the optimal complexity balancing bias and variance.

Senior Architectural TakeawayUnderfitting yields high training and validation error; overfitting yields low training error but diverging validation error. Stop training or regularize at the validation loss inflection point.

How do L1 (Lasso) and L2 (Ridge) regularization mathematically penalize model complexity, and why does L1 lead to sparse feature selection?

How do Gradient Boosted Decision Trees (XGBoost / LightGBM) optimize arbitrary loss functions using second-order Taylor expansion, and how do they prevent overfitting compared to Random Forests?

02
Module Topic•3 Questions under this topic

Unsupervised Learning

Full Guide & Mechanics

How does the K-Means algorithm converge, and how do you determine the optimal number of clusters K using the Elbow Method and Silhouette Score?

How does Principal Component Analysis (PCA) reduce dimensionality using covariance matrix eigendecomposition, and what are its core linear assumptions?

How do you detect novel fraud anomalies in high-dimensional unlabelled transactions using Isolation Forests and DBSCAN, and what are the limitations of distance-based anomaly detection?

03
Module Topic•3 Questions under this topic

Neural Networks & Deep Learning

Full Guide & Mechanics

Why do neural networks require non-linear activation functions like ReLU or GELU, and what happens if only linear activations are used?

How does Backpropagation calculate weight gradients using the multivariable chain rule, and how does the computational graph track intermediate tensors?

How do Batch Normalization, Layer Normalization, and Residual Connections (Skip Connections) prevent vanishing and exploding gradients in 100+ layer networks?

04
Module Topic•3 Questions under this topic

Natural Language Processing (NLP)

Full Guide & Mechanics

What is Byte Pair Encoding (BPE) tokenization, and why is subword tokenization preferred over character-level and word-level tokenization?

How do Word2Vec (Skip-gram with Negative Sampling) and contextual embeddings differ in representing polysemous words?

How do LSTMs and GRUs resolve the vanishing gradient problem of vanilla RNNs, and why have Transformers fundamentally replaced recurrent architectures in modern NLP?

05
Module Topic•3 Questions under this topic

Computer Vision & CNNs

Full Guide & Mechanics

Why are Convolutional Neural Networks (CNNs) superior to Fully Connected Networks (MLPs) for image processing tasks?

How do Object Detection models like YOLO predict bounding boxes in a single forward pass, and how does Non-Maximum Suppression (NMS) filter overlapping boxes?

How does Vision Transformer (ViT) adapt the standard Transformer architecture for computer vision, and why does ViT require more training data than CNNs?

06
Module Topic•3 Questions under this topic

Transformers & LLMs

Full Guide & Mechanics

How does Scaled Dot-Product Attention work mathematically, and why do we divide the dot product of Query and Key by √d_k?

What is the difference between Pre-training, Supervised Fine-Tuning (SFT), and Preference Alignment (RLHF / DPO) in LLM development?

How does KV Caching optimize autoregressive decoding latency in LLMs, and how do FlashAttention and Grouped-Query Attention (GQA) reduce memory bandwidth bottlenecks?

07
Module Topic•3 Questions under this topic

Model Deployment & MLOps

Full Guide & Mechanics

What is the difference between Data Drift and Concept Drift, and what statistical tests are used to detect them in production ML pipelines?

How do Post-Training Quantization (PTQ) and Quantization-Aware Training (QAT) reduce model size and latency, and how does INT8 quantization work?

How do you architect a high-throughput, sub-10ms real-time ML inference platform using Triton Inference Server, Dynamic Batching, and Shadow Deployments?