summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2022-03-29 10:11:53 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2022-03-29 10:11:53 +0200
commit7989d4fdace6e46f31ccb45f027ba91ae34bc8e8 (patch)
treeba5a1d0c0ecd184a28aae9e8f7151fa320371759
parent039267dc4c5ad1991f57bfef26a1f70cce2c617d (diff)
parameters: to_dot: Allow exporting single-node trees
-rw-r--r--lib/parameters.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/parameters.py b/lib/parameters.py
index cb4b76f..01b3e66 100644
--- a/lib/parameters.py
+++ b/lib/parameters.py
@@ -704,7 +704,11 @@ class ModelAttribute:
return ret
def to_dot(self):
- if type(self.model_function) == df.SplitFunction:
+ if type(self.model_function) in (
+ df.SplitFunction,
+ df.StaticFunction,
+ df.AnalyticFunction,
+ ):
import pydot
graph = pydot.Dot("Regression Model Tree", graph_type="graph")