hi Charles,

> I'm using lars_path in order to get the regularization path of lasso.
> I'd like to have some clarifications about the outputs:
>
> alphas, _, coefs = lars_path(X, y, method='lasso')
>
> Am I correct in assuming that:
> 1. alphas contains the hitting times of the parameter?

the location of the kinks on the piecewise linear path.

> 2. alphas should be sorted in ascending order? Or at least sorted?

no. The path is fit starting from high alpha so alphas are returns in
decreasing order.

> 3. Given 0 <= i < len(alphas), coefs[i] contains the coefficient of
> the lasso regression for the parameter alphas[i]?

yes

> Basically, I want a function that given a list of parameters will
> compute the lasso coefficients for each parameter.

either do the interpolation yourself or if you want an out the box
solution you can use lasso_path instead. It uses coordinate descent
for the optim and can take as param a list of alphas.

Alex

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to