diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2022-03-18 15:27:21 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2022-03-18 15:27:21 +0100 |
commit | 5b581296d52acb3ec84ce684e0aa7e553e47a2af (patch) | |
tree | e095bb6d2b9b3750db4166f4958abd711bf0ec30 /lib | |
parent | 5ca002107d4fb1ff989a1fa645169018b31e531a (diff) |
CART export: use .left/.right instead of .child.left/.child.right
Diffstat (limited to 'lib')
-rw-r--r-- | lib/functions.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/functions.py b/lib/functions.py index bfe0b00..de5c722 100644 --- a/lib/functions.py +++ b/lib/functions.py @@ -521,15 +521,12 @@ class CARTFunction(SKLearnRegressionFunction): ] sub_data["paramDecisionValue"] = tree.threshold[node_id] sub_data["type"] = "scalarSplit" - sub_data["child"] = {} # child value if left_child != self.leaf_id: - sub_data["child"]["left"] = self.recurse_(tree, left_child, depth=depth + 1) + sub_data["left"] = self.recurse_(tree, left_child, depth=depth + 1) if right_child != self.leaf_id: - sub_data["child"]["right"] = self.recurse_( - tree, right_child, depth=depth + 1 - ) + sub_data["right"] = self.recurse_(tree, right_child, depth=depth + 1) return sub_data |