summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2022-03-03 07:40:59 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2022-03-03 07:40:59 +0100
commitc8f8b54632fcbc91543078b07ac3516883cc762d (patch)
tree7fc436418983a027b2439e3341e99a93c75521ed /lib
parentb5dda07a577232f3dff6abe88b2e829e35d6602e (diff)
CART: to_json: use .left / .right instead of ."<=" / .">"
Diffstat (limited to 'lib')
-rw-r--r--lib/functions.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/functions.py b/lib/functions.py
index aeaf48e..c81c3e3 100644
--- a/lib/functions.py
+++ b/lib/functions.py
@@ -525,9 +525,9 @@ class CARTFunction(SKLearnRegressionFunction):
# child value
if left_child != self.leaf_id:
- sub_data["child"]["<="] = self.recurse_(tree, left_child, depth=depth + 1)
+ sub_data["child"]["left"] = self.recurse_(tree, left_child, depth=depth + 1)
if right_child != self.leaf_id:
- sub_data["child"][">"] = self.recurse_(tree, right_child, depth=depth + 1)
+ sub_data["child"]["right"] = self.recurse_(tree, right_child, depth=depth + 1)
return sub_data