Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
45d2b5f
1
Parent(s):
885dd39
Lower requirements for noise test
Browse files- test/test.py +3 -3
test/test.py
CHANGED
@@ -160,7 +160,7 @@ class TestPipeline(unittest.TestCase):
|
|
160 |
self.assertNotIn("unused_feature", model.latex())
|
161 |
self.assertIn("T", model.latex())
|
162 |
self.assertIn("x", model.latex())
|
163 |
-
self.assertLessEqual(model.get_best()["loss"], 1e-
|
164 |
fn = model.get_best()["lambda_format"]
|
165 |
self.assertListEqual(list(sorted(fn._selection)), [0, 1])
|
166 |
X2 = pd.DataFrame(
|
@@ -170,8 +170,8 @@ class TestPipeline(unittest.TestCase):
|
|
170 |
"x": np.random.randn(100),
|
171 |
}
|
172 |
)
|
173 |
-
self.assertLess(np.average((fn(X2) - true_fn(X2)) ** 2), 1e-
|
174 |
-
self.assertLess(np.average((model.predict(X2) - true_fn(X2)) ** 2), 1e-
|
175 |
|
176 |
|
177 |
class TestBest(unittest.TestCase):
|
|
|
160 |
self.assertNotIn("unused_feature", model.latex())
|
161 |
self.assertIn("T", model.latex())
|
162 |
self.assertIn("x", model.latex())
|
163 |
+
self.assertLessEqual(model.get_best()["loss"], 1e-1)
|
164 |
fn = model.get_best()["lambda_format"]
|
165 |
self.assertListEqual(list(sorted(fn._selection)), [0, 1])
|
166 |
X2 = pd.DataFrame(
|
|
|
170 |
"x": np.random.randn(100),
|
171 |
}
|
172 |
)
|
173 |
+
self.assertLess(np.average((fn(X2) - true_fn(X2)) ** 2), 1e-1)
|
174 |
+
self.assertLess(np.average((model.predict(X2) - true_fn(X2)) ** 2), 1e-1)
|
175 |
|
176 |
|
177 |
class TestBest(unittest.TestCase):
|