mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
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>
This commit is contained in:
parent
fbad85d3ec
commit
dc50add8a7
|
@ -27,7 +27,9 @@ def xgboost(
|
|||
... 1.14300000e+03, 2.60958904e+00, 3.67800000e+01, -1.19780000e+02]]))
|
||||
array([[1.1139996]], dtype=float32)
|
||||
"""
|
||||
xgb = XGBRegressor(verbosity=0, random_state=42)
|
||||
xgb = XGBRegressor(
|
||||
verbosity=0, random_state=42, tree_method="exact", base_score=0.5
|
||||
)
|
||||
xgb.fit(features, target)
|
||||
# Predict target for test data
|
||||
predictions = xgb.predict(test_features)
|
||||
|
|
Loading…
Reference in New Issue
Block a user