Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Linear Regression

1. Mathematical Fundamentals & Modeling

Linear regression models the relationship between labeled examples {(xi,yi)}i=1m\{(x_i, y_i)\}_{i=1}^{m}.


2. Optimization Algorithms

Gradient Descent (GD)

Stochastic Gradient Descent (SGD)

Comparison of Methods

MethodSolution TypeComplexityBest Use Case
Analyticalw∗=(X⊤X)−1X⊤yw^* = (X^\top X)^{-1} X^\top yO(md2+d3)O(md^2 + d^3)Moderate mm and dd; exact solution needed.
GDIterative Approx.O(mdlog⁡1ϵ)O(md \log \frac{1}{\epsilon})Large dd but moderate mm.
SGDIterative Approx.O(d⋅1ϵ)O(d \cdot \frac{1}{\epsilon})Both mm and dd are very large.

3. Advanced Modeling Techniques

Multiple Outputs & Classification

Polynomial Regression


4. Regularization (MAP Estimation)

Regularization adds a penalty term to the loss to avoid overfitting and ensure X⊤XX^\top X is invertible.


5. Robust Linear Regression