Spaces:
Sleeping
Sleeping
Commit
·
2acedc5
1
Parent(s):
fdc95c9
Clean up anti-patterns
Browse files- pysr/sr.py +4 -4
pysr/sr.py
CHANGED
|
@@ -995,8 +995,8 @@ def get_hof(
|
|
| 995 |
else:
|
| 996 |
sympy_symbols = [sympy.Symbol("x%d" % i) for i in range(n_features)]
|
| 997 |
|
| 998 |
-
for
|
| 999 |
-
eqn = sympify(
|
| 1000 |
sympy_format.append(eqn)
|
| 1001 |
|
| 1002 |
# Numpy:
|
|
@@ -1026,8 +1026,8 @@ def get_hof(
|
|
| 1026 |
)
|
| 1027 |
torch_format.append(module)
|
| 1028 |
|
| 1029 |
-
curMSE =
|
| 1030 |
-
curComplexity =
|
| 1031 |
|
| 1032 |
if lastMSE is None:
|
| 1033 |
cur_score = 0.0
|
|
|
|
| 995 |
else:
|
| 996 |
sympy_symbols = [sympy.Symbol("x%d" % i) for i in range(n_features)]
|
| 997 |
|
| 998 |
+
for _, eqn_row in output.iterrows():
|
| 999 |
+
eqn = sympify(eqn_row["Equation"], locals=local_sympy_mappings)
|
| 1000 |
sympy_format.append(eqn)
|
| 1001 |
|
| 1002 |
# Numpy:
|
|
|
|
| 1026 |
)
|
| 1027 |
torch_format.append(module)
|
| 1028 |
|
| 1029 |
+
curMSE = eqn_row["MSE"]
|
| 1030 |
+
curComplexity = eqn_row["Complexity"]
|
| 1031 |
|
| 1032 |
if lastMSE is None:
|
| 1033 |
cur_score = 0.0
|