1

The lambda parameter in ridge regression penalizes larger coefficients and pushes the model to balance the trade-off between fitting the data the best it can while taking into account the size of the coefficient. As a result coefficients are generally pushed closer to zero, which a larger amount of shrinkage for larger values of lambda.


1

It seems that the reason why you're getting the better result has nothing to do with cross-validation, but rather with weight adjustment happening during calculation of cross-validation result in train_decode function. To check this, I have used the following simulation, results = {"beta": [], "folds": []} noises = np.arange(0,1,0.1) ...


Only top voted, non community-wiki answers of a minimum length are eligible