Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
bad0567
1
Parent(s):
358f0ab
Move shape checking to fit()
Browse files- pysr/sr.py +11 -10
pysr/sr.py
CHANGED
@@ -1015,16 +1015,6 @@ class PySRRegressor(BaseEstimator, RegressorMixin, MultiOutputMixin):
|
|
1015 |
Validated list of variable names for each feature in `X`.
|
1016 |
|
1017 |
"""
|
1018 |
-
if X.shape[1] > 10000 and not self.batching:
|
1019 |
-
warnings.warn(
|
1020 |
-
"Note: you are running with more than 10,000 datapoints. "
|
1021 |
-
"You should consider turning on batching (https://astroautomata.com/PySR/#/options?id=batching). "
|
1022 |
-
"You should also reconsider if you need that many datapoints. "
|
1023 |
-
"Unless you have a large amount of noise (in which case you "
|
1024 |
-
"should smooth your dataset first), generally < 10,000 datapoints "
|
1025 |
-
"is enough to find a functional form with symbolic regression. "
|
1026 |
-
"More datapoints will lower the search speed."
|
1027 |
-
)
|
1028 |
|
1029 |
if isinstance(X, pd.DataFrame):
|
1030 |
if variable_names:
|
@@ -1415,6 +1405,17 @@ class PySRRegressor(BaseEstimator, RegressorMixin, MultiOutputMixin):
|
|
1415 |
|
1416 |
self._setup_equation_file()
|
1417 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1418 |
# Parameter input validation (for parameters defined in __init__)
|
1419 |
X, y, Xresampled, variable_names = self._validate_fit_params(
|
1420 |
X, y, Xresampled, variable_names
|
|
|
1015 |
Validated list of variable names for each feature in `X`.
|
1016 |
|
1017 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1018 |
|
1019 |
if isinstance(X, pd.DataFrame):
|
1020 |
if variable_names:
|
|
|
1405 |
|
1406 |
self._setup_equation_file()
|
1407 |
|
1408 |
+
if X.shape[1] > 10000 and not self.batching:
|
1409 |
+
warnings.warn(
|
1410 |
+
"Note: you are running with more than 10,000 datapoints. "
|
1411 |
+
"You should consider turning on batching (https://astroautomata.com/PySR/#/options?id=batching). "
|
1412 |
+
"You should also reconsider if you need that many datapoints. "
|
1413 |
+
"Unless you have a large amount of noise (in which case you "
|
1414 |
+
"should smooth your dataset first), generally < 10,000 datapoints "
|
1415 |
+
"is enough to find a functional form with symbolic regression. "
|
1416 |
+
"More datapoints will lower the search speed."
|
1417 |
+
)
|
1418 |
+
|
1419 |
# Parameter input validation (for parameters defined in __init__)
|
1420 |
X, y, Xresampled, variable_names = self._validate_fit_params(
|
1421 |
X, y, Xresampled, variable_names
|