Skip to content

Commit dc50add

Browse files
Update xgboost_regressor.py (#9078)
* Update xgboost_regressor.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent fbad85d commit dc50add

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: machine_learning/xgboost_regressor.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ def xgboost(
2727
... 1.14300000e+03, 2.60958904e+00, 3.67800000e+01, -1.19780000e+02]]))
2828
array([[1.1139996]], dtype=float32)
2929
"""
30-
xgb = XGBRegressor(verbosity=0, random_state=42)
30+
xgb = XGBRegressor(
31+
verbosity=0, random_state=42, tree_method="exact", base_score=0.5
32+
)
3133
xgb.fit(features, target)
3234
# Predict target for test data
3335
predictions = xgb.predict(test_features)

0 commit comments

Comments
 (0)