Skip to content

Commit 73c7de3

Browse files
committed
cosmit: better exception
remove troublesome 32bit test
1 parent a8bdbff commit 73c7de3

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

sklearn/ensemble/gradient_boosting.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,8 +764,9 @@ def fit(self, X, y, monitor=None):
764764
# add more estimators to fitted model
765765
# invariant: warm_start = True
766766
if self.n_estimators < self.estimators_.shape[0]:
767-
raise ValueError('n_estimators must be larger or equal to estimators_.shape[0] ' +
768-
'when warm_start==True')
767+
raise ValueError('n_estimators=%d must be larger or equal to'
768+
'estimators_.shape[0]=%d when warm_start==True'
769+
% (self.n_estimators, self.estimators_.shape[0]))
769770
begin_at_stage = self.estimators_.shape[0]
770771
y_pred = self.decision_function(X)
771772
self._resize_state()

sklearn/tree/tests/test_tree.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -600,19 +600,6 @@ def test_sample_weight():
600600
clf2.tree_.threshold[internal])
601601

602602

603-
# def test_32bit_equality():
604-
# """Check if 32bit and 64bit get the same result. """
605-
# from sklearn.cross_validation import train_test_split
606-
# X_train, X_test, y_train, y_test = train_test_split(boston.data,
607-
# boston.target,
608-
# random_state=1)
609-
# est = DecisionTreeRegressor(random_state=1)
610-
611-
# est.fit(X_train, y_train)
612-
# score = est.score(X_test, y_test)
613-
# assert_almost_equal(score, 0.86908506408880637)
614-
615-
616603
def test_max_leaf_nodes():
617604
"""Test greedy trees with max_depth + 1 leafs. """
618605
from sklearn.tree._tree import TREE_LEAF

0 commit comments

Comments
 (0)