Spaces:
Running
Running
Commit
·
25e0721
1
Parent(s):
c51257e
Add deterministic mode with new SR version
Browse files- pysr/sr.py +9 -0
- pysr/version.py +2 -2
pysr/sr.py
CHANGED
|
@@ -435,6 +435,12 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
|
|
| 435 |
Pass an int for reproducible results across multiple function calls.
|
| 436 |
See :term:`Glossary <random_state>`.
|
| 437 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 438 |
warm_start : bool, default=False
|
| 439 |
Tells fit to continue from where the last call to fit finished.
|
| 440 |
If false, each call to fit will be fresh, overwriting previous results.
|
|
@@ -647,6 +653,7 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
|
|
| 647 |
fast_cycle=False,
|
| 648 |
precision=32,
|
| 649 |
random_state=None,
|
|
|
|
| 650 |
warm_start=False,
|
| 651 |
verbosity=1e9,
|
| 652 |
update_verbosity=None,
|
|
@@ -732,6 +739,7 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
|
|
| 732 |
self.fast_cycle = fast_cycle
|
| 733 |
self.precision = precision
|
| 734 |
self.random_state = random_state
|
|
|
|
| 735 |
self.warm_start = warm_start
|
| 736 |
# Additional runtime parameters
|
| 737 |
# - Runtime user interface
|
|
@@ -1363,6 +1371,7 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
|
|
| 1363 |
max_evals=self.max_evals,
|
| 1364 |
earlyStopCondition=self.early_stop_condition,
|
| 1365 |
seed=seed,
|
|
|
|
| 1366 |
)
|
| 1367 |
|
| 1368 |
# Convert data to desired precision
|
|
|
|
| 435 |
Pass an int for reproducible results across multiple function calls.
|
| 436 |
See :term:`Glossary <random_state>`.
|
| 437 |
|
| 438 |
+
deterministic : bool, default=False
|
| 439 |
+
Make a PySR search give the same result every run.
|
| 440 |
+
To use this, you must turn off parallelism
|
| 441 |
+
(with :param`procs`=0, :param`multithreading`=False),
|
| 442 |
+
and set :param`random_state` to a fixed seed.
|
| 443 |
+
|
| 444 |
warm_start : bool, default=False
|
| 445 |
Tells fit to continue from where the last call to fit finished.
|
| 446 |
If false, each call to fit will be fresh, overwriting previous results.
|
|
|
|
| 653 |
fast_cycle=False,
|
| 654 |
precision=32,
|
| 655 |
random_state=None,
|
| 656 |
+
deterministic=False,
|
| 657 |
warm_start=False,
|
| 658 |
verbosity=1e9,
|
| 659 |
update_verbosity=None,
|
|
|
|
| 739 |
self.fast_cycle = fast_cycle
|
| 740 |
self.precision = precision
|
| 741 |
self.random_state = random_state
|
| 742 |
+
self.deterministic = deterministic
|
| 743 |
self.warm_start = warm_start
|
| 744 |
# Additional runtime parameters
|
| 745 |
# - Runtime user interface
|
|
|
|
| 1371 |
max_evals=self.max_evals,
|
| 1372 |
earlyStopCondition=self.early_stop_condition,
|
| 1373 |
seed=seed,
|
| 1374 |
+
deterministic=self.deterministic,
|
| 1375 |
)
|
| 1376 |
|
| 1377 |
# Convert data to desired precision
|
pysr/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
-
__version__ = "0.8.
|
| 2 |
-
__symbolic_regression_jl_version__ = "0.9.
|
|
|
|
| 1 |
+
__version__ = "0.8.8"
|
| 2 |
+
__symbolic_regression_jl_version__ = "0.9.5"
|