[scikit-learn] Delegating "get_params" and "set_params" to a wrapped estimator when parameter is not defined.

Manuel CASTEJÓN LIMAS mcasl at unileon.es
Fri May 18 08:32:21 EDT 2018


Dear Joel,

I've changed the code of PipeGraph in order to change the old wrappers to
new Mixin Classes. The changes are reflected in this MixinClasses branch:

https://github.com/mcasl/PipeGraph/blob/feature/MixinClasses/pipegraph/adapters.py

My conclusions are that although both approaches are feasible and provide
similar functionality, Mixin Classes provide a simpler solution. Following
the 'flat is better than nested' principle, the mixin classes should be
favoured.
This approach seems as well to be more in line with general
sklearn development practice, so I'll make the necessary changes to the
docs and then the master branch will be replaced with this new Mixin
classes version.

Thanks for pointing out this issue!
Best
Manuel

2018-04-16 14:21 GMT+02:00 Manuel CASTEJÓN LIMAS <mcasl at unileon.es>:

> Nope! Mostly because of lack of experience with mixins.
> I've done some reading and I think I can come up with a few mixins doing
> the trick by dynamically adding their methods to an already instantiated
> object. I'll play with that and I hope to show you something soon! Or at
> least I will have better grounds to make an educated decision.
> Best
> Manuel
>
>
>
>
> Manuel Castejón Limas
> *Escuela de Ingeniería Industrial e Informática*
> Universidad de León
> Campus de Vegazana sn.
> 24071. León. Spain.
> *e-mail: *manuel.castejon at unileon.es
> *Tel.*: +34 987 291 946
>
> Digital Business Card: Click Here <http://qrs.ly/5c3jpaj>
>
>
>
> 2018-04-15 15:18 GMT+02:00 Joel Nothman <joel.nothman at gmail.com>:
>
>> Have you considered whether a mixin is a better model than a wrapper?​
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20180518/611a026c/attachment.html>


More information about the scikit-learn mailing list