Hey all.
This might be a very silly question, but I am wondering why set_params 
and get_params are methods and not functions.
They are not overloaded anywhere in sklearn, and the ability to overload 
them seems likely to cause trouble.
If we used functions instead of methods, we could just remove them from 
the API, which would be nice.

We could even go one step further, and instead of using set_params, 
directly build the subestimator behavior into "clone".
The only application for get_params that we currently have afaik is
est_with_params = clone(est).set_params(**params)
If we instead did
est_with_params = clone_with_params(est, **params)
we could use __init__ to set the parameters directly, which would allow 
us to do input validation in __init__.

Is there any reason not to do that? I would find that behavior a lot 
less surprising.

Cheers,
Andy

------------------------------------------------------------------------------
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=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to