Machine Learning Basics
Which of the following correctly describes regularization and related methods for reducing overfitting?
- AL1 regularization adds the sum of the absolute values of the weights to the loss, and tends to make some weights exactly zero
- BL2 regularization adds the sum of the absolute values of the weights to the loss, and strongly narrows down features by setting unneeded weights to zero
- CDropout randomly disables neurons every time, in both training and inference, to give the output some variability
Show answer and explanation
Answer: A. L1 regularization adds the sum of the absolute values of the weights to the loss, and tends to make some weights exactly zero
Regularization adds a penalty depending on the size of the weights to the loss function, keeping the weights from growing too large and the model simple. L1 regularization adds the sum of the absolute values of the weights and tends to make some weights exactly zero, so it narrows down the features used (lasso regression). L2 regularization adds the sum of the squared weights and shrinks the weights overall, but they rarely become exactly zero (ridge regression, weight decay). Dropout randomly disables neurons during training only, so that the network does not rely too much on particular neurons; at inference all neurons are used.
- A. Correct. The absolute-value penalty tends to make some weights exactly zero.
- B. L2 regularization adds the sum of the squared weights; it shrinks the weights overall but rarely makes them exactly zero. Adding the sum of absolute values is L1 regularization.
- C. Neurons are disabled only during training; all neurons are used at inference.