Hi George.
A way to avoid the error is by using lists of grids, where each grid
only has valid combinations
param_grid = [{'dual': False, 'penalty': 'l1', 'C': 10. ** np.arange(-3,
3)}, {'dual': True, 'penalty':'l2', 'loss': 'l2', 'C': : 10. **
np.arange(-3, 3)}]
or something like that. (Look up the allowed combination in the docs, I
don't know them by heart ;)
What are you searching over? Searching over whether to use the dual or
not does not really make much sense to me.
Best,
Andy
On 11/18/2014 11:41 AM, George Bezerra wrote:
I'm trying to perform a grid search cv for logistic regression but I
stumble on invalid combination of parameters:
ValueError: Unsupported set of arguments: penalty='l1' is only
supported when dual='false'., Parameters: penalty='l1', loss='lr',
dual=True
Is there a way to avoid this problem?
Thanks,
George.
--
George Bezerra
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general