Spaces:
Sleeping
Sleeping
deepsource-autofix[bot]
commited on
Commit
•
23834a6
1
Parent(s):
9f82c1b
Format code with black
Browse files- pysr/sr.py +4 -2
pysr/sr.py
CHANGED
@@ -73,8 +73,8 @@ sympy_mappings = {
|
|
73 |
"div": lambda x, y: x / y,
|
74 |
"mult": lambda x, y: x * y,
|
75 |
"sqrt_abs": lambda x: sympy.sqrt(abs(x)),
|
76 |
-
"square": lambda x: x
|
77 |
-
"cube": lambda x: x
|
78 |
"plus": lambda x, y: x + y,
|
79 |
"sub": lambda x, y: x - y,
|
80 |
"neg": lambda x: -x,
|
@@ -341,6 +341,8 @@ def _add_sr_to_julia_project(Main, io_arg):
|
|
341 |
rev="v0.7.8",
|
342 |
)
|
343 |
Main.eval(f"Pkg.add(spec, {io_arg})")
|
|
|
|
|
344 |
class PySRRegressor(BaseEstimator, RegressorMixin):
|
345 |
def __init__(
|
346 |
self,
|
|
|
73 |
"div": lambda x, y: x / y,
|
74 |
"mult": lambda x, y: x * y,
|
75 |
"sqrt_abs": lambda x: sympy.sqrt(abs(x)),
|
76 |
+
"square": lambda x: x**2,
|
77 |
+
"cube": lambda x: x**3,
|
78 |
"plus": lambda x, y: x + y,
|
79 |
"sub": lambda x, y: x - y,
|
80 |
"neg": lambda x: -x,
|
|
|
341 |
rev="v0.7.8",
|
342 |
)
|
343 |
Main.eval(f"Pkg.add(spec, {io_arg})")
|
344 |
+
|
345 |
+
|
346 |
class PySRRegressor(BaseEstimator, RegressorMixin):
|
347 |
def __init__(
|
348 |
self,
|