I agree; if you're not actually doing daisy-chaining, the stateful and
more concise form `clf.fit(X.y)` looks more pythonic in my opinion.

Also it seems that the "fit returns self" convention is not documented
here [1], maybe we should briefly mention it?

http://scikit-learn.org/stable/tutorial/basic/tutorial.html

On Tue, Dec 13, 2016 at 3:45 PM, Andreas Mueller <[email protected]> wrote:
>
>
> On 12/13/2016 03:38 PM, Vlad Niculae wrote:
>>
>> It is part of the API and enforced with tests, if I'm not mistaken. So you
>> could use either form with all sklearn estimators.
>
>
> It is indeed enforced.
> Though I feel clf = clf.fit(X, y)
> is somewhat ugly and I would rather not have it in the docs.
> Alsok this example uses a capital Y,so two reasons to change it ;)
>
> _______________________________________________
> scikit-learn mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/scikit-learn
_______________________________________________
scikit-learn mailing list
[email protected]
https://mail.python.org/mailman/listinfo/scikit-learn

Reply via email to