samedi 6 octobre 2018

Why does scikit-learn's sklearn.ensemble.BaseForest#fit() return the self object

I came across a good number of cases where people write code like:

clf = clf.fit(...)

Possibly, is there a design pattern that it is trying to follow?

Source code: https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/forest.py

Aucun commentaire:

Enregistrer un commentaire