Contents
Does regularization increase model complexity?
Regularization basically adds the penalty as model complexity increases. Regularization parameter (lambda) penalizes all the parameters except intercept so that model generalizes the data and won’t overfit. In above gif as the complexity is increasing, regularization will add the penalty for higher terms.
How do you model complexity?
There are several ways to vary the complexity of a model to try to improve its performance:
- Using fewer features reduces model complexity.
- Increasing the number and size of layers used in a neural network model, or the number and depth of trees used in a random forest model, increases model complexity.
Which is more complex model complexity or regularization?
If model complexity is a function of weights, a feature weight with a high absolute value is more complex than a feature weight with a low absolute value. We can quantify complexity using the L2 regularization formula, which defines the regularization term as the sum of the squares of all the feature weights:
What is the regularization term for a linear model?
In this formula, weights close to zero have little effect on model complexity, while outlier weights can have a huge impact. For example, a linear model with the following weights: Has an L2 regularization term of 26.915: But w 3 (bolded above), with a squared value of 25, contributes nearly all the complexity.
Our training optimization algorithm is now a function of two terms: the loss term, which measures how well the model fits the data, and the regularization term , which measures model complexity. Machine Learning Crash Course focuses on two common (and somewhat related) ways to think of model complexity:
How is model complexity a function of weights?
Model complexity as a function of the total number of features with nonzero weights. (A later module covers this approach.) If model complexity is a function of weights, a feature weight with a high absolute value is more complex than a feature weight with a low absolute value.