Spaces:
Running
Running
Fix other DQ tests
Browse files- pysr/test/test.py +2 -3
pysr/test/test.py
CHANGED
|
@@ -1029,9 +1029,8 @@ class TestDimensionalConstraints(unittest.TestCase):
|
|
| 1029 |
for i in range(2):
|
| 1030 |
self.assertGreater(model.get_best()[i]["complexity"], 2)
|
| 1031 |
self.assertLess(model.get_best()[i]["loss"], 1e-6)
|
| 1032 |
-
|
| 1033 |
-
|
| 1034 |
-
)
|
| 1035 |
|
| 1036 |
def test_unit_checks(self):
|
| 1037 |
"""This just checks the number of units passed"""
|
|
|
|
| 1029 |
for i in range(2):
|
| 1030 |
self.assertGreater(model.get_best()[i]["complexity"], 2)
|
| 1031 |
self.assertLess(model.get_best()[i]["loss"], 1e-6)
|
| 1032 |
+
simple_eqs = model.equations_[i].query("complexity <= 2")
|
| 1033 |
+
self.assertTrue(len(simple_eqs) == 0 or simple_eqs.loss.min() > 1e-6)
|
|
|
|
| 1034 |
|
| 1035 |
def test_unit_checks(self):
|
| 1036 |
"""This just checks the number of units passed"""
|