Spaces:
Sleeping
Sleeping
Commit
·
a9a1691
1
Parent(s):
a79a3fb
Refactored out depreciation errors
Browse files- pysr/sr.py +8 -4
pysr/sr.py
CHANGED
|
@@ -191,10 +191,7 @@ def pysr(X=None, y=None, weights=None,
|
|
| 191 |
(as strings).
|
| 192 |
|
| 193 |
"""
|
| 194 |
-
|
| 195 |
-
raise ValueError("The threads kwarg is deprecated. Use procs.")
|
| 196 |
-
if limitPowComplexity:
|
| 197 |
-
raise ValueError("The limitPowComplexity kwarg is deprecated. Use constraints.")
|
| 198 |
if maxdepth is None:
|
| 199 |
maxdepth = maxsize
|
| 200 |
if equation_file is None:
|
|
@@ -466,6 +463,13 @@ const varMap = {'["' + '", "'.join(variable_names) + '"]'}"""
|
|
| 466 |
return get_hof()
|
| 467 |
|
| 468 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 469 |
def run_feature_selection(X, y, select_k_features):
|
| 470 |
"""Use a gradient boosting tree regressor as a proxy for finding
|
| 471 |
the k most important features in X, returning indices for those
|
|
|
|
| 191 |
(as strings).
|
| 192 |
|
| 193 |
"""
|
| 194 |
+
raise_depreciation_errors(limitPowComplexity, threads)
|
|
|
|
|
|
|
|
|
|
| 195 |
if maxdepth is None:
|
| 196 |
maxdepth = maxsize
|
| 197 |
if equation_file is None:
|
|
|
|
| 463 |
return get_hof()
|
| 464 |
|
| 465 |
|
| 466 |
+
def raise_depreciation_errors(limitPowComplexity, threads):
|
| 467 |
+
if threads is not None:
|
| 468 |
+
raise ValueError("The threads kwarg is deprecated. Use procs.")
|
| 469 |
+
if limitPowComplexity:
|
| 470 |
+
raise ValueError("The limitPowComplexity kwarg is deprecated. Use constraints.")
|
| 471 |
+
|
| 472 |
+
|
| 473 |
def run_feature_selection(X, y, select_k_features):
|
| 474 |
"""Use a gradient boosting tree regressor as a proxy for finding
|
| 475 |
the k most important features in X, returning indices for those
|