Spaces:
Running
Running
Commit
·
0445487
1
Parent(s):
30b2f09
Make high precision test robust against pareto front
Browse files- test/test.py +7 -1
test/test.py
CHANGED
|
@@ -88,9 +88,15 @@ class TestPipeline(unittest.TestCase):
|
|
| 88 |
**self.default_test_kwargs,
|
| 89 |
early_stop_condition="stop_if(loss, complexity) = loss < 1e-25 && complexity == 3",
|
| 90 |
precision=64,
|
|
|
|
| 91 |
)
|
| 92 |
model.fit(self.X, y)
|
| 93 |
-
self.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
|
| 95 |
from pysr.sr import Main
|
| 96 |
|
|
|
|
| 88 |
**self.default_test_kwargs,
|
| 89 |
early_stop_condition="stop_if(loss, complexity) = loss < 1e-25 && complexity == 3",
|
| 90 |
precision=64,
|
| 91 |
+
parsimony=0.01,
|
| 92 |
)
|
| 93 |
model.fit(self.X, y)
|
| 94 |
+
self.assertTrue(
|
| 95 |
+
any(
|
| 96 |
+
"1.23456789" in row["equation"]
|
| 97 |
+
for _, row in model.equations_.iterrows()
|
| 98 |
+
)
|
| 99 |
+
)
|
| 100 |
|
| 101 |
from pysr.sr import Main
|
| 102 |
|