summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2022-03-28 16:27:43 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2022-03-28 16:27:43 +0200
commit039267dc4c5ad1991f57bfef26a1f70cce2c617d (patch)
tree265b32ee188aa043aca38a2cac3de3f04f74db23 /lib
parenta4f567e5606b483bb99f9d317a423c1864f4fd03 (diff)
StaticFunction#to_dot: round to two decimal places
Diffstat (limited to 'lib')
-rw-r--r--lib/functions.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/functions.py b/lib/functions.py
index 978a993..3c2b424 100644
--- a/lib/functions.py
+++ b/lib/functions.py
@@ -277,7 +277,9 @@ class StaticFunction(ModelFunction):
return ret
def to_dot(self, pydot, graph, feature_names, parent=None):
- graph.add_node(pydot.Node(str(id(self)), label=self.value, shape="rectangle"))
+ graph.add_node(
+ pydot.Node(str(id(self)), label=f"{self.value:.2f}", shape="rectangle")
+ )
@classmethod
def from_json(cls, data):