It will be fixed in version 0.15, but that is not yet released. So you can
use the development version for now (see
http://scikit-learn.org/stable/developers/index.html#git-repo).
On 14 March 2014 11:15, Alexey Sorokin <[email protected]> wrote:
> Nice, thanks!
>
> What is the version number where this is fixed?
>
> Alexey.
>
>
> On Fri, Mar 14, 2014 at 12:03 AM, Joel Nothman <[email protected]>wrote:
>
>> Hi Alexey,
>>
>> That part of the code has since been rewritten, and whether intentional
>> or not, this is now fixed.
>>
>> - Joel
>>
>>
>>
>> On 14 March 2014 10:35, Alexey Sorokin <[email protected]>wrote:
>>
>>> Hello,
>>>
>>>
>>>
>>> I'm quite new to scikit-learn, so please forgive me if I'm not doing it
>>> right. I'm using version 0.14.
>>>
>>>
>>>
>>> I'm using LassoCV and passing my own vector of alphas. What seems to be
>>> happening is that somewhere inside the LinearModelCV.fit() function, the
>>> alphas vector is copied and then sorted in a descending order. However,
>>> when the optimal alpha index is found the alpha is then taken from the
>>> original vector!!! Is this a bug or a feature?
>>>
>>>
>>>
>>> Example:
>>>
>>> X = [[1, 2], [-1, 2], [1, -2], [-2, 0], [0, -2]]
>>>
>>> Y = [4, 5, 6, 7, 10]
>>>
>>> regr = linear_model.LassoCV(alphas = [0.0001, 0.001], fit_intercept =
>>> False)
>>>
>>> regr.fit(X, Y)
>>>
>>> print "lasso r2", regr.score(X, Y), "alpha", regr.alpha_
>>>
>>> regr = linear_model.LassoCV(alphas = [0.001, 0.0001], fit_intercept =
>>> False)
>>>
>>> regr.fit(X, Y)
>>>
>>> print "lasso r2", regr.score(X, Y), "alpha", regr.alpha_
>>>
>>> outputs
>>>
>>> lasso r2 -8.27498253267 alpha 0.0001
>>>
>>> lasso r2 -8.27498282478 alpha 0.001
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Alexey Sorokin.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Learn Graph Databases - Download FREE O'Reilly Book
>>> "Graph Databases" is the definitive new guide to graph databases and
>>> their
>>> applications. Written by three acclaimed leaders in the field,
>>> this first edition is now available. Download your free book today!
>>> http://p.sf.net/sfu/13534_NeoTech
>>> _______________________________________________
>>> Scikit-learn-general mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Learn Graph Databases - Download FREE O'Reilly Book
>> "Graph Databases" is the definitive new guide to graph databases and their
>> applications. Written by three acclaimed leaders in the field,
>> this first edition is now available. Download your free book today!
>> http://p.sf.net/sfu/13534_NeoTech
>> _______________________________________________
>> Scikit-learn-general mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>>
>>
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general