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

2018-04-16 Thread Manuel CASTEJÓN LIMAS via scikit-learn
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

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

2018-04-16 Thread Javier López
How could I make mixins work in this case? If I define the class `FancyEstimatorMixin`, in order to get a drop-in replacement for a sklearn object wouldn't I need to monkey-patch the scikit-learn `BaseEstimator` class to inherit from my mixin? Or am I misunderstanding something? (BTW monkey-patch

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

2018-04-16 Thread Javier López
Hi Manolo! Your code looks nice, but my use case is a bit different. I have a mixed set of parameters, some come from my wrapper, and some from the wrapped estimator. The logic I am going for is something like "If you know about this parameter, then deal with it, if not, then pass it along to the

[scikit-learn] Issues with kmeans: Difference in centroid values

2018-04-16 Thread Sidak Pal Singh
Hi everyone, I was using scikit-learn KMeans algorithm to cluster pretrained word-vectors. There are a few things which I found to be surprising and wanted to get some feedback on. - Based upon the 'labels_' assigned to each word-vector (i.e. cluster memberships), I compute every cluster centroid

Re: [scikit-learn] Issues with kmeans: Difference in centroid values

2018-04-16 Thread Andreas Mueller
On 04/16/2018 04:07 PM, Sidak Pal Singh wrote: Hi everyone, I was using scikit-learn KMeans algorithm to cluster pretrained word-vectors. There are a few things which I found to be surprising and wanted to get some feedback on. - Based upon the 'labels_' assigned to each word-vector (i.e.