Spaces:
Sleeping
Sleeping
tttc3
commited on
Commit
·
7ed402e
1
Parent(s):
f266b70
Add ScikitLearn check_estimator test
Browse files- test/test.py +7 -0
test/test.py
CHANGED
|
@@ -4,12 +4,19 @@ from unittest.mock import patch
|
|
| 4 |
import numpy as np
|
| 5 |
from pysr import PySRRegressor
|
| 6 |
from pysr.sr import run_feature_selection, _handle_feature_selection
|
|
|
|
| 7 |
import sympy
|
| 8 |
from sympy import lambdify
|
| 9 |
import pandas as pd
|
| 10 |
import warnings
|
| 11 |
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
class TestPipeline(unittest.TestCase):
|
| 14 |
def setUp(self):
|
| 15 |
# Using inspect,
|
|
|
|
| 4 |
import numpy as np
|
| 5 |
from pysr import PySRRegressor
|
| 6 |
from pysr.sr import run_feature_selection, _handle_feature_selection
|
| 7 |
+
from sklearn.utils.estimator_checks import check_estimator
|
| 8 |
import sympy
|
| 9 |
from sympy import lambdify
|
| 10 |
import pandas as pd
|
| 11 |
import warnings
|
| 12 |
|
| 13 |
|
| 14 |
+
class TestScikitLearn(unittest.TestCase):
|
| 15 |
+
def test_all_estimators(self):
|
| 16 |
+
model = PySRRegressor()
|
| 17 |
+
check_estimator(model)
|
| 18 |
+
|
| 19 |
+
|
| 20 |
class TestPipeline(unittest.TestCase):
|
| 21 |
def setUp(self):
|
| 22 |
# Using inspect,
|