Spaces:
Sleeping
Sleeping
MilesCranmer
commited on
Commit
•
406ae3e
1
Parent(s):
26a3c7f
Move shape checking to _validate_fit_params
Browse files- pysr/sr.py +11 -11
pysr/sr.py
CHANGED
@@ -922,17 +922,6 @@ class PySRRegressor(BaseEstimator, RegressorMixin, MultiOutputMixin):
|
|
922 |
)
|
923 |
self.batch_size = 1
|
924 |
|
925 |
-
if n_samples > 10000 and not self.batching:
|
926 |
-
warnings.warn(
|
927 |
-
"Note: you are running with more than 10,000 datapoints. "
|
928 |
-
"You should consider turning on batching (https://astroautomata.com/PySR/#/options?id=batching). "
|
929 |
-
"You should also reconsider if you need that many datapoints. "
|
930 |
-
"Unless you have a large amount of noise (in which case you "
|
931 |
-
"should smooth your dataset first), generally < 10,000 datapoints "
|
932 |
-
"is enough to find a functional form with symbolic regression. "
|
933 |
-
"More datapoints will lower the search speed."
|
934 |
-
)
|
935 |
-
|
936 |
# Ensure instance parameters are allowable values:
|
937 |
# ValueError - Incompatible values
|
938 |
if self.tournament_selection_n > self.population_size:
|
@@ -1020,6 +1009,17 @@ class PySRRegressor(BaseEstimator, RegressorMixin, MultiOutputMixin):
|
|
1020 |
Validated list of variable names for each feature in `X`.
|
1021 |
|
1022 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1023 |
if isinstance(X, pd.DataFrame):
|
1024 |
if variable_names:
|
1025 |
variable_names = None
|
|
|
922 |
)
|
923 |
self.batch_size = 1
|
924 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
925 |
# Ensure instance parameters are allowable values:
|
926 |
# ValueError - Incompatible values
|
927 |
if self.tournament_selection_n > self.population_size:
|
|
|
1009 |
Validated list of variable names for each feature in `X`.
|
1010 |
|
1011 |
"""
|
1012 |
+
if X.shape[1] > 10000 and not self.batching:
|
1013 |
+
warnings.warn(
|
1014 |
+
"Note: you are running with more than 10,000 datapoints. "
|
1015 |
+
"You should consider turning on batching (https://astroautomata.com/PySR/#/options?id=batching). "
|
1016 |
+
"You should also reconsider if you need that many datapoints. "
|
1017 |
+
"Unless you have a large amount of noise (in which case you "
|
1018 |
+
"should smooth your dataset first), generally < 10,000 datapoints "
|
1019 |
+
"is enough to find a functional form with symbolic regression. "
|
1020 |
+
"More datapoints will lower the search speed."
|
1021 |
+
)
|
1022 |
+
|
1023 |
if isinstance(X, pd.DataFrame):
|
1024 |
if variable_names:
|
1025 |
variable_names = None
|