-
-
Notifications
You must be signed in to change notification settings - Fork 26.2k
Closed
Labels
Description
here is a tiny script which reproduces the crash.
from sklearn.datasets import load_iris
from sklearn import ensemble
from sklearn.cross_validation import train_test_split
iris = load_iris()
X, y = iris.data, iris.target
X, y = X[y < 2], y[y < 2] # make it binary
X_train, X_test, y_train, y_test = train_test_split(X, y)
# Fit GBT init with RF
rf = ensemble.RandomForestClassifier()
clf = ensemble.GradientBoostingClassifier(init=rf)
clf.fit(X_train, y_train)
acc = clf.score(X_test, y_test)
print("Accuracy: {:.4f}".format(acc))
It also seems that the init param in GradientBoostingClassifier is
not really tested.