From 039267dc4c5ad1991f57bfef26a1f70cce2c617d Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 28 Mar 2022 16:27:43 +0200 Subject: StaticFunction#to_dot: round to two decimal places --- lib/functions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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): -- cgit v1.2.3