[scikit-learn] Why do DTs have a different fit protocol than NB and SVMs?

Andreas Mueller t3kcit at gmail.com
Tue Dec 13 15:45:02 EST 2016



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 ;)


More information about the scikit-learn mailing list