diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2022-03-23 09:55:23 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2022-03-23 09:55:23 +0100 |
commit | 7da00ef63f0ed4a73edaeed3c80457cf309cb2be (patch) | |
tree | 6d587d6f2071b48ae92c7d19aad733e5e8bbb3a2 /lib/parameters.py | |
parent | 2de3d7c6a79ad6a8d2e595181cfebf1e5d69cfd1 (diff) |
RMT, CART, XGB: Add #leaves to dref export
Diffstat (limited to 'lib/parameters.py')
-rw-r--r-- | lib/parameters.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/parameters.py b/lib/parameters.py index dae6e2a..cb4b76f 100644 --- a/lib/parameters.py +++ b/lib/parameters.py @@ -693,7 +693,12 @@ class ModelAttribute: ret["decision tree/nodes"] = 1 ret["decision tree/max depth"] = 1 - if type(self.model_function) in (df.LMTFunction,): + if type(self.model_function) in ( + df.SplitFunction, + df.CARTFunction, + df.LMTFunction, + df.XGBoostFunction, + ): ret["decision tree/leaves"] = self.model_function.get_number_of_leaves() return ret @@ -1257,7 +1262,6 @@ class ModelAttribute: if np.all(np.isinf(loss)): # all children have the same configuration. We shouldn't get here due to the threshold check above... if ffs_feasible: - logger.debug("ffs feasible, attempting to fit a leaf") # try generating a function. if it fails, model_function is a StaticFunction. ma = ModelAttribute( self.name + "_", |