Weight decay, also called L2 regularization or ridge regression, discourages overly complex regression models by adding a penalty based on the L2 norm of their coefficients to the regression error. A regularization parameter controls how much that penalty matters. section 4.5
Figure 4.7 Both L1 and L2 shrink the size of the coefficient. L1 regularization (left) does it much faster, because it subtracts a fixed amount, so it is likely to eventually become zero. L2 regularization takes much longer, because it multiplies the coefficient by a small factor, so it never reaches zero.
The comparison illustrates how L2 regularization gradually shrinks coefficients, unlike L1 regularization, which can drive them to zero. section 4.5
For a polynomial regression example, compare models with no regularization, L1 regularization, and L2 regularization. The unregularized model fits training points closely but performs poorly on testing points; the L2 model fits both sets well. In Turi Create, set `l2_penalty` when creating the model. section 4.6








