From c8f8b54632fcbc91543078b07ac3516883cc762d Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 3 Mar 2022 07:40:59 +0100 Subject: CART: to_json: use .left / .right instead of ."<=" / .">" --- lib/functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3