ndawe/scikit-learn — pull request #9 by pprett (2012-12-15 19:43:29+00:00)
Title: fix performance regression in Criterion.update .

no need to return ``n_left`` and ``weighted_n_left`` in ``Criterion.update``, use ``Criterion.n_left`` and ``Criterion.weighted_n_left`` instead .

I did the following benchmark::

from sklearn import datasets
X, y = datasets.make_hastie_10_2()
from sklearn.ensemble import gradient_boosting
clf = gradient_boosting.GradientBoostingClassifier(n_estimators=100, max_depth=3)
%timeit clf.fit(X, y)

sklearn master:

1 loops, best of 3: 2.13 s per loop

ndawe treeweights:

1 loops, best of 3: 4.01 s per loop

this pr:

1 loops, best of 3: 2.27 s per loop