math11
math11

Reputation: 537

Lasso and Ridge estimator

I have a txt file containing a large set of data. How do I go about using the lasso or the ridge estimator to fit a regression equation?

I got as far as using: gridge

However, I am unsure of what that lambda section is doing. I found it on a website and have no idea what values to put there.

And I don't know how to interpret the output: modified HKB estimator is 5.465433 modifiedL-W estimator is 7.6435664 smallest value of GCV at 3.24

How am I supposed to fit a regression equation using that information?

Upvotes: 2

Views: 3253

Answers (1)

iTech
iTech

Reputation: 18430

Lambda is the strength of the penalty, See this to understand better the effect of lambda. Generally, you select this value by try-and-error or using cross validation procedure.

Both Lasso and Ridge estimation help to reduce the model over fitting by limiting the value of the parameters to be estimated. The main difference between them is the shape of the penalty function.

Lasso can result in a sparse model where some parameters can be exactly zero, while Ridge can lead to parameters with very small value but not exactly zero.

Upvotes: 2

Related Questions