A closed-form solution computes unknown model parameters directly by solving equations, rather than improving guessed values through repeated training steps. It suits smaller problems, where solving everything at once can be faster and more accurate than iteration. Large machine-learning datasets usually favor iterative solutions because they process only small data portions at a time. section 2.12 section 1.3.5
For a weighted-sum model with parameters w0, w1, and b, training examples produce a linear system: the matrix of input values and constants is multiplied by the parameter vector to match the target-output vector. Formal solving methods obtain the parameters in one step; matrix notation keeps the same idea compact as the number of variables grows. section 2.12
A toy threat-score model
Three cat-brain training examples yield 0.11w0 + 0.09w1 + b = −0.8, 0.01w0 + 0.02w1 + b = −0.97, and 0.98w0 + 0.91w1 + b = 0.89. In this small system, w0 = 1, w1 = 1, and b = −1 visibly satisfy the equations. A general closed-form technique extends this direct approach beyond values that can be recognized by inspection. section 2.12
Table 2.3 Example training dataset for our toy machine learning–based cat brain
| Input value: Hardness |
Input value: Sharpness |
Output: Threat score |
|
|---|---|---|---|
| 0 |
0.11 |
0.09 |
−0.8 |
| 1 |
0.01 |
0.02 |
−0.97 |
| 2 |
0.98 |
0.91 |
0.89 |
Inspect the compact training table linking hardness and sharpness inputs to target threat scores. section 2.12
