Looking at the code, fit_intercept=False will unfortunately not prevent
_randomized_lasso from centering the data. I think this should be
considered an inconsistency (whether it be the reason or not for the
differences you observe)

Michael

On Tuesday, July 8, 2014, Michael Eickenberg <michael.eickenb...@gmail.com>
wrote:

> The RandomizedLasso object fits an intercept by default, ie it subtracts
> the means of the columns of your design X. This can make it rank deficient.
> You can try setting fit_intercept to false, but there may very likely be
> other processing steps that make the two differ.
>
> Michael
>
> On Tuesday, July 8, 2014, Luca Puggini <lucapug...@gmail.com
> <javascript:_e(%7B%7D,'cvml','lucapug...@gmail.com');>> wrote:
>
>> I did not but according to the theory all the variables should be selected 
>> with probability one if p<n.
>>
>> This happens in lasso_stability_path but not in randomizedlasso
>>
>> The randomness should not have effect in this case
>>
>> Luca
>>
>>
>> Did you fix the random number generator using the keyword random_state= ?
>> Otherwise this may vary statistically.
>>
>> Michael
>>
>>
>> On Tue, Jul 8, 2014 at 6:11 PM, Luca Puggini <lucapuggio@...> wrote:
>>
>> > Hi,
>> > RandomizedLasso and lasso_stability path should return the same results if
>> > used on the same data.  This does not happen when the number of variables
>> > is smaller than the number of samples
>> > (at least this is the situation that I have tried).
>> > Accoring to the theory the correct result should be the one returned by
>> > lasso_stability_path i.e. all the score equal to 1 in case p<n
>> >
>> > alphas, scores = lasso_stability_path(x, y, scaling=0.3)
>> > r = RandomizedLasso(alpha=alphas, scaling=0.3).fit(x,y)
>> >
>> >
>> > Let me know.
>> > Thanks!
>>
>>
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to