Question: What is the difference between L1 and L2 regularization?Answer: L1 regularization adds the absolute values of the coefficients to the cost function, encouraging sparsity, while L2 regularization adds the squared values, penalizing large coefficients. L1 tends to produce sparse models, while L2 prevents extreme values in the coefficients. |
Is it helpful?
Yes
No
Most helpful rated by users:
- Explain the concept of feature engineering.
- Explain the term \'hyperparameter\' in the context of machine learning.
- What is the purpose of the activation function in a neural network?
- What is the purpose of regularization in machine learning?
- What is the concept of a confusion matrix?