Spaces:
Sleeping
Sleeping
MilesCranmer
commited on
Commit
•
529ca52
1
Parent(s):
a39e08e
Roll back some test changes for new hyperparams
Browse files- test/test.py +2 -1
test/test.py
CHANGED
@@ -21,7 +21,6 @@ class TestPipeline(unittest.TestCase):
|
|
21 |
)
|
22 |
self.default_test_kwargs = dict(
|
23 |
niterations=default_niterations * 2,
|
24 |
-
model_selection="accuracy",
|
25 |
populations=default_populations * 2,
|
26 |
)
|
27 |
np.random.seed(0)
|
@@ -31,6 +30,7 @@ class TestPipeline(unittest.TestCase):
|
|
31 |
y = self.X[:, 0]
|
32 |
model = PySRRegressor(**self.default_test_kwargs)
|
33 |
model.fit(self.X, y)
|
|
|
34 |
print(model.equations)
|
35 |
self.assertLessEqual(model.get_best()["loss"], 1e-4)
|
36 |
|
@@ -103,6 +103,7 @@ class TestPipeline(unittest.TestCase):
|
|
103 |
X = np.random.randn(100, 1)
|
104 |
y = X[:, 0] + 3.0
|
105 |
regressor = PySRRegressor(
|
|
|
106 |
unary_operators=[],
|
107 |
binary_operators=["plus"],
|
108 |
**self.default_test_kwargs,
|
|
|
21 |
)
|
22 |
self.default_test_kwargs = dict(
|
23 |
niterations=default_niterations * 2,
|
|
|
24 |
populations=default_populations * 2,
|
25 |
)
|
26 |
np.random.seed(0)
|
|
|
30 |
y = self.X[:, 0]
|
31 |
model = PySRRegressor(**self.default_test_kwargs)
|
32 |
model.fit(self.X, y)
|
33 |
+
model.set_params(model_selection="accuracy")
|
34 |
print(model.equations)
|
35 |
self.assertLessEqual(model.get_best()["loss"], 1e-4)
|
36 |
|
|
|
103 |
X = np.random.randn(100, 1)
|
104 |
y = X[:, 0] + 3.0
|
105 |
regressor = PySRRegressor(
|
106 |
+
model_selection="accuracy",
|
107 |
unary_operators=[],
|
108 |
binary_operators=["plus"],
|
109 |
**self.default_test_kwargs,
|