New answers tagged

2

Suppose $w'$ is the optimal $w$ with a smaller $\lambda$ (say $\lambda'$) and $w$ is the optimal with the larger $\lambda$ We know $L(w',\lambda')\leq L(w,\lambda')$ because $w'$ is optimal (by definition), and $L(w,\lambda')\leq L(w,\lambda)$ because $L$ is increasing in $\lambda$. The first inequality is actually stronger than you asked for; it says that ...


9

You might be asking too much of Lasso. Even in the first simulation, Example 1 in the original paper (available from here), Lasso only chose the "correct" model about 1/4 of the time. And that was with 3 out of 8 predictors having non-zero coefficients, a high signal-to-noise ratio, and more observations (20 per simulation) than predictors. In Example 3 of ...


2

I do not know if you are still interested in this issue. I think it will be useful for your problem to look at the limiting result of the estimator mean squared error (for a penalty parameter approaching infinity). We can indicate with $\hat{\beta}_{r} = (X^\top X + \lambda I )^{-1} X^\top y$ the ridge estimator and with $\hat{\beta} = (X^\top X)^{-1} X^\...


2

You are right, the optimization problem is equivalent. $\arg \min ( ||X_s−Y_sD_s||^2_F+λ_1(||D_s||^2_F−1)+λ_2||D_s||^2_F )$ = $\arg \min ( ||X_s−Y_sD_s||^2_F+(λ_1+λ_2)||D_s||^2_F-λ_1 ) $ = $\arg \min ( ||X_s−Y_sD_s||^2_F+(λ_1+λ_2)||D_s||^2_F) $ = $\arg \min ( ||X_s−Y_sD_s||^2_F+\tilde{λ}_1||D_s||^2_F ) $


3

Your example is not showing the difference between batch vs. stochastic gradient descent. Rather, it is more the difference between direct vs. iterative solution of the least squares model. See here for more details. In general, iterative methods can require many iterations to converge, and the returned solution will depend on the tolerance requested. For ...


1

This seems a really interesting discussion and it is maybe nice to point another feature of regularization. Why regularization reduces the risk of overfitting? At a first look could sound strange to talk about overfitting for such a simple model (simple linear regression). However, I think the point the example wants to emphasize is the impact of the ...


0

There are two main issues to consider, I think, to understand regularization properly. Variance reduction First one is that best training fit is highly variable, so pulling the estimated parameters to some array of values fixed a priori effectively reduces that variability by introducing some bias. You probably already heard about the concept of bias-...


1

It's an awkward example to demo regularization. The problem is that nobody regularizes with two variables and 36 data points. It's just one terrible example which makes me cringe. If anything the issue is underfitting - there's not enough variables (or degrees of freedom) in this model. For instance, no matter what is GDP per capita if your country has GULAG ...


7

1.a Related to the Variance/Bias trade off. Bias / variance tradeoff math You could see the regularization as a form of shrinking the parameters. When you are fitting a model to data then the you need to consider that your data (and your resulting estimates) are made/generated from two components: $$ \text{data $=$ deterministic part $+$ noise }$$ Your ...


1

I will expand upon @Bloc97 's answer about the difference between $L1$ and $L2$ constraints, in order to show why $L1$ may drive some weights to zero. In the case of $L2$ regularization, the gradient of a single weight is given by $$ \delta w = u - 2pw$$ where $u$ is the input from the previous layer being multiplied by weight $w$, and $p$ is parameter ...


0

I'm going to ignore all rigor and just give an answer that (hopefully) appeals to intuition. Let's consider least squares. Then our goal seeks to find $argmin\{ RSS + \lambda J \}$ where $J$ is the complexity penalty and $\lambda$ is a tunable hyperparameter. You can think of $J$ being L1 or L2 regularization, maybe $J := \|\beta\|^2$. So ignoring all ...


1

Consider a large collection of regression problems like this one, with different 'true best' slopes and different estimated slopes. You're correct that in any single data set, the estimated slope is equally likely to be above or below the truth. But if you look at the whole collection of problems, the estimated slopes will vary more than the true slopes (...


1

It's two very different datasets, if you run the example in the vignette: data(CoxExample) dim(y) [1] 1000 2 dim(x) [1] 1000 30 There's only 30 genes in the example and looking at the numbers on top of your plot, you have > 100, so the range of lambda tested goes lower. The range of lambda goes all the way to 10^-8 whereas in the first plot its 10^-5....


0

You have to view test data as a stand in for a feed of "new" data that your model will receive when used to make decisions in a production setting. it could be that the intercept ('mean') of y in the test data is very different to the mean of y in the training data (= the intercept of the ridge model). If I judge the fit of my ridge model using R^2, the ...


3

$L_2$ regularization is basically adding a parabola with a minimum at the origin to the loss surface. How steeply the parabola rises depends on the magnitude of the $L_2$ penalty. If the penalty is too large, then the effect of regularization will overwhelm the signal from the cross-entropy loss, because the shape of the surface is so distorted by the ...


1

The loss term underlined with red marker is the reconstruction loss between the input to the reconstruction of the input(paper is about on reconstruction!) , not L2 regularization . VAE's loss has two components: reconstruction loss(since autoencoder's aim to learn to reconstruct) and KL loss (to measure how much information is lost or how much we have ...


Top 50 recent answers are included