summaryrefslogtreecommitdiff
path: root/lib/functions.py
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-01-25 11:57:16 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-01-25 11:59:57 +0100
commit27e4210a7546cb72a0df1c0d54c7c09fed628e12 (patch)
tree2ed68915eb4a0ee890bfa0ab0dc3d2b7bf0d518e /lib/functions.py
parentc2e1e6f4034e7800f8b151fa2e971478d4376347 (diff)
XGB: switch to XGBoost defaults
Diffstat (limited to 'lib/functions.py')
-rw-r--r--lib/functions.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/functions.py b/lib/functions.py
index 32f777b..d18477e 100644
--- a/lib/functions.py
+++ b/lib/functions.py
@@ -763,7 +763,12 @@ class XGBoostFunction(SKLearnRegressionFunction):
def hyper_to_dref(self):
return {
"xgb/n estimators": self.regressor.n_estimators,
- "xgb/max depth": self.regressor.max_depth,
+ "xgb/max depth": self.regressor.max_depth == 0
+ and "infty"
+ or self.regressor.max_depth,
+ "xgb/max leaves": self.regressor.max_leaves == 0
+ and "infty"
+ or self.regressor.max_leaves,
"xgb/subsample": self.regressor.subsample,
"xgb/eta": self.regressor.learning_rate,
"xgb/gamma": self.regressor.gamma,