diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2022-01-18 16:35:00 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2022-01-18 16:35:00 +0100 |
commit | 9955d6a859616fcc80fb7eea0134c375bcb1330f (patch) | |
tree | 99d1cd70d8b8fb24d670fd8c96a624b7ec72f3b3 | |
parent | 04619e4c28d5c6b919d841b57d8341ddcbbbfceb (diff) |
optionally export xgboost model
-rw-r--r-- | lib/parameters.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/parameters.py b/lib/parameters.py index 3157c91..50fefbe 100644 --- a/lib/parameters.py +++ b/lib/parameters.py @@ -965,6 +965,9 @@ class ModelAttribute: self.model_function = df.SKLearnRegressionFunction( np.mean(data), xgb, category_to_index, ignore_index ) + output_filename = os.getenv("DFATOOL_XGB_DUMP_MODEL", None) + if output_filename: + xgb.dump_model(output_filename, dump_format="json", with_stats=True) return if loss_ignore_scalar and not with_function_leaves: |