def test_gentleboost_musk_fitting():
c = GentleBoostClassifier(
base_estimator=DecisionTreeRegressor(max_depth=1),
n_estimators=30,
learning_rate=1.0
)
data = MUSK1()
c.fit(data.data, np.sign(data.labels))
assert_array_less(c.estimator_errors_, 0.5)
assert zero_one_loss(np.sign(data.labels), c.predict(data.data)) < 0.1
评论列表
文章目录