summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2022-03-03 09:59:21 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2022-03-03 09:59:21 +0100
commitfe7a702e6a7724ba8ef31697f5bf60eb800102b3 (patch)
tree915941977dd773181805193db680d820d7fcfbb5
parentc8f8b54632fcbc91543078b07ac3516883cc762d (diff)
functions: black
-rw-r--r--lib/functions.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/functions.py b/lib/functions.py
index c81c3e3..ac92af9 100644
--- a/lib/functions.py
+++ b/lib/functions.py
@@ -527,7 +527,9 @@ class CARTFunction(SKLearnRegressionFunction):
if left_child != self.leaf_id:
sub_data["child"]["left"] = self.recurse_(tree, left_child, depth=depth + 1)
if right_child != self.leaf_id:
- sub_data["child"]["right"] = self.recurse_(tree, right_child, depth=depth + 1)
+ sub_data["child"]["right"] = self.recurse_(
+ tree, right_child, depth=depth + 1
+ )
return sub_data
@@ -847,7 +849,7 @@ class analytic:
"logarithmic": np.log,
"logarithmic1": lambda x: np.log(x + 1),
"exponential": np.exp,
- "square": lambda x: x ** 2,
+ "square": lambda x: x**2,
"inverse": lambda x: 1 / x,
"sqrt": lambda x: np.sqrt(np.abs(x)),
"num0_8": _num0_8,
@@ -906,7 +908,7 @@ class analytic:
#'polynomial' : lambda reg_param, model_param: reg_param[0] + reg_param[1] * model_param + reg_param[2] * model_param ** 2,
"square": ParamFunction(
lambda reg_param, model_param: reg_param[0]
- + reg_param[1] * model_param ** 2,
+ + reg_param[1] * model_param**2,
lambda model_param: True,
2,
repr_str="β₀ + β₁ * x²",