Teach.sg ← Back to Mathematics

Normal Equation

🦉 Normal Equation Formula
$$\theta = (X^T X)^{-1}X^T y$$
🦉 Advantages and Disadvantages
No need to choose $\alpha$
Don't need to iterate
Need to compute $(X^TX)^{-1}$
Slow if $n$ is very large
🦉 If X^T X is Non-invertible
Redundant features (linearly dependent)
Too many features (e.g. $m \leq n$)
delete some features
use regularisation