diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2022-01-21 10:58:40 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2022-01-21 10:58:40 +0100 |
commit | 24c253ed6453b9f49ebe03a49d6adf32f86f0b23 (patch) | |
tree | e81b4a2c599d35ea960a60faf6a3c5ad8c36e76f /lib | |
parent | 9955d6a859616fcc80fb7eea0134c375bcb1330f (diff) |
parameters: fix xgb model dump
Diffstat (limited to 'lib')
-rw-r--r-- | lib/parameters.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/parameters.py b/lib/parameters.py index 50fefbe..49d7d1f 100644 --- a/lib/parameters.py +++ b/lib/parameters.py @@ -947,7 +947,6 @@ class ModelAttribute: xgb = xgboost.XGBRegressor( n_estimators=int(os.getenv("DFATOOL_XGB_N_ESTIMATORS", "100")), max_depth=int(os.getenv("DFATOOL_XGB_MAX_DEPTH", "10")), - learning_rate=0.2, subsample=0.7, gamma=0.01, reg_alpha=0.0006, @@ -967,7 +966,9 @@ class ModelAttribute: ) output_filename = os.getenv("DFATOOL_XGB_DUMP_MODEL", None) if output_filename: - xgb.dump_model(output_filename, dump_format="json", with_stats=True) + xgb.get_booster().dump_model( + output_filename, dump_format="json", with_stats=True + ) return if loss_ignore_scalar and not with_function_leaves: |