Spaces:
Sleeping
Sleeping
MilesCranmer
commited on
Commit
•
ab66141
1
Parent(s):
79eac3a
Add option to set max_evals
Browse files- pysr/sr.py +5 -0
pysr/sr.py
CHANGED
@@ -419,6 +419,7 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
|
|
419 |
multithreading=None,
|
420 |
cluster_manager=None,
|
421 |
skip_mutation_failures=True,
|
|
|
422 |
# To support deprecated kwargs:
|
423 |
**kwargs,
|
424 |
):
|
@@ -559,6 +560,8 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
|
|
559 |
:type precision: int
|
560 |
:param skip_mutation_failures: Whether to skip mutation and crossover failures, rather than simply re-sampling the current member.
|
561 |
:type skip_mutation_failures: bool
|
|
|
|
|
562 |
:param kwargs: Supports deprecated keyword arguments. Other arguments will result
|
563 |
in an error
|
564 |
:type kwargs: dict
|
@@ -745,6 +748,7 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
|
|
745 |
multithreading=multithreading,
|
746 |
cluster_manager=cluster_manager,
|
747 |
skip_mutation_failures=skip_mutation_failures,
|
|
|
748 |
),
|
749 |
}
|
750 |
|
@@ -1309,6 +1313,7 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
|
|
1309 |
progress=self.params["progress"],
|
1310 |
timeout_in_seconds=self.params["timeout_in_seconds"],
|
1311 |
crossoverProbability=self.params["crossover_probability"],
|
|
|
1312 |
skip_mutation_failures=self.params["skip_mutation_failures"],
|
1313 |
)
|
1314 |
|
|
|
419 |
multithreading=None,
|
420 |
cluster_manager=None,
|
421 |
skip_mutation_failures=True,
|
422 |
+
max_evals=None,
|
423 |
# To support deprecated kwargs:
|
424 |
**kwargs,
|
425 |
):
|
|
|
560 |
:type precision: int
|
561 |
:param skip_mutation_failures: Whether to skip mutation and crossover failures, rather than simply re-sampling the current member.
|
562 |
:type skip_mutation_failures: bool
|
563 |
+
:param max_evals: Limits the total number of evaluations of expressions to this number.
|
564 |
+
:type max_evals: int
|
565 |
:param kwargs: Supports deprecated keyword arguments. Other arguments will result
|
566 |
in an error
|
567 |
:type kwargs: dict
|
|
|
748 |
multithreading=multithreading,
|
749 |
cluster_manager=cluster_manager,
|
750 |
skip_mutation_failures=skip_mutation_failures,
|
751 |
+
max_evals=max_evals,
|
752 |
),
|
753 |
}
|
754 |
|
|
|
1313 |
progress=self.params["progress"],
|
1314 |
timeout_in_seconds=self.params["timeout_in_seconds"],
|
1315 |
crossoverProbability=self.params["crossover_probability"],
|
1316 |
+
max_evals=self.params["max_evals"],
|
1317 |
skip_mutation_failures=self.params["skip_mutation_failures"],
|
1318 |
)
|
1319 |
|