AI engineering glossary · Classical ML algorithms
What is normal equation?
Normal equation: The closed-form formula that gives the least-squares weights in one step: w = (X^T X)^-1 X^T y, where X is the matrix of features and y the vector of targets. It needs no learning rate or iteration but becomes slow or unstable with many features or near-duplicate columns.
Normal equation: an example
With 3 features and 10,000 rows, NumPy solves w = np.linalg.solve(X.T @ X, X.T @ y) directly instead of running gradient descent.
Related terms
More Classical ML algorithms terms
- Odds ratio
- One-class SVM
- One-vs-one
- One-vs-rest
- Ordinary least squares
- Out-of-bag error
- Perceptron
- Permutation importance
Where you learn it
Normal equation is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.