summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-01-16 13:45:55 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-01-16 13:45:55 +0100
commit345e450ebf4d0c4d36cf99762bafafdebd1f0dd5 (patch)
treeca4b1627bc1a73ce70f98e516e7f81c952f0b8d7
parent8b44b1348af4ffce0a71584440fc11ed5482d2cc (diff)
Add LMT support for --export-json / ModelAttribute.to_json
-rw-r--r--lib/parameters.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/parameters.py b/lib/parameters.py
index 0c4401c..58af96f 100644
--- a/lib/parameters.py
+++ b/lib/parameters.py
@@ -611,7 +611,11 @@ class ModelAttribute:
return f"ModelAttribute<{self.name}, {self.attr}, mean={mean}>"
def to_json(self, **kwargs):
- if type(self.model_function) in (df.CARTFunction, df.XGBoostFunction):
+ if type(self.model_function) in (
+ df.CARTFunction,
+ df.LMTFunction,
+ df.XGBoostFunction,
+ ):
import sklearn.tree
feature_names = list(