[dask, sklearn] Fix predict proba. (#6566)

* For sklearn:
  - Handles user defined objective function.
  - Handles `softmax`.

* For dask:
  - Use the implementation from sklearn, the previous implementation doesn't perform any extra handling.
This commit is contained in:
Jiaming Yuan
2021-01-05 08:29:06 +08:00
committed by GitHub
parent 516a93d25c
commit 60cfd14349
5 changed files with 74 additions and 9 deletions

View File

@@ -160,7 +160,7 @@ def test_boost_from_prediction(tree_method: str) -> None:
tree_method=tree_method,
)
model_0.fit(X=X_, y=y_)
margin = model_0.predict_proba(X_, output_margin=True)
margin = model_0.predict(X_, output_margin=True)
model_1 = xgb.dask.DaskXGBClassifier(
learning_rate=0.3,