0
例如:为什么使用scikit-learn的GradientBoostingRegressor从相同的输入中获得不同的输出?
params = {'n_estimators': 200, "max_depth": 4, 'subsample': 1, 'learning_rate': 0.1}
boost = ensemble.GradientBoostingRegressor(**params)
ghostBoost = ensemble.GradientBoostingRegressor(**params)
...
boost.fit(x, y)
ghostBoost.fit(x, y)
...
predictionA = boost.predict(features)
predictionB = ghostBoost.predict(features)
boost
和ghostBoost
是精确的相同,但predictionA
不等于predictionB
,为什么会出现这种情况?
非常感谢!我强制'random_state' = 1,现在所有结果都是一致的,这会以任何方式影响性能吗? – Shane
不,它不应该影响性能。 – ogrisel
我刚刚注意到当输入样本的顺序发生变化时,结果应该是相同的,实际上是不同的,请您也可以在http://stackoverflow.com/questions/22170677/how-什么时候输入样本是变化的? – Shane