Spaces:
Sleeping
Sleeping
MilesCranmer
commited on
Commit
•
f3bcfd5
1
Parent(s):
c3a1736
Add crossovers and bump version
Browse files- pysr/sr.py +5 -0
- pysr/version.py +2 -2
pysr/sr.py
CHANGED
@@ -375,6 +375,7 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
|
|
375 |
weightMutateOperator=1,
|
376 |
weightRandomize=1,
|
377 |
weightSimplify=0.002,
|
|
|
378 |
perturbationFactor=1.0,
|
379 |
extra_sympy_mappings=None,
|
380 |
extra_torch_mappings=None,
|
@@ -488,6 +489,8 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
|
|
488 |
:type weightRandomize: float
|
489 |
:param weightSimplify: Relative likelihood for mutation to simplify constant parts by evaluation
|
490 |
:type weightSimplify: float
|
|
|
|
|
491 |
:param equation_file: Where to save the files (.csv separated by |)
|
492 |
:type equation_file: str
|
493 |
:param verbosity: What verbosity level to use. 0 means minimal print statements.
|
@@ -630,6 +633,7 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
|
|
630 |
weightMutateOperator=weightMutateOperator,
|
631 |
weightRandomize=weightRandomize,
|
632 |
weightSimplify=weightSimplify,
|
|
|
633 |
perturbationFactor=perturbationFactor,
|
634 |
verbosity=verbosity,
|
635 |
update_verbosity=update_verbosity,
|
@@ -1157,6 +1161,7 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
|
|
1157 |
use_symbolic_utils=self.params["use_symbolic_utils"],
|
1158 |
progress=self.params["progress"],
|
1159 |
timeout_in_seconds=self.params["timeout_in_seconds"],
|
|
|
1160 |
)
|
1161 |
|
1162 |
np_dtype = {16: np.float16, 32: np.float32, 64: np.float64}[
|
|
|
375 |
weightMutateOperator=1,
|
376 |
weightRandomize=1,
|
377 |
weightSimplify=0.002,
|
378 |
+
crossoverProbability=0.01,
|
379 |
perturbationFactor=1.0,
|
380 |
extra_sympy_mappings=None,
|
381 |
extra_torch_mappings=None,
|
|
|
489 |
:type weightRandomize: float
|
490 |
:param weightSimplify: Relative likelihood for mutation to simplify constant parts by evaluation
|
491 |
:type weightSimplify: float
|
492 |
+
:param crossoverProbability: Absolute probability of crossover-type genetic operation, instead of a mutation.
|
493 |
+
:type crossoverProbability: float
|
494 |
:param equation_file: Where to save the files (.csv separated by |)
|
495 |
:type equation_file: str
|
496 |
:param verbosity: What verbosity level to use. 0 means minimal print statements.
|
|
|
633 |
weightMutateOperator=weightMutateOperator,
|
634 |
weightRandomize=weightRandomize,
|
635 |
weightSimplify=weightSimplify,
|
636 |
+
crossoverProbability=crossoverProbability,
|
637 |
perturbationFactor=perturbationFactor,
|
638 |
verbosity=verbosity,
|
639 |
update_verbosity=update_verbosity,
|
|
|
1161 |
use_symbolic_utils=self.params["use_symbolic_utils"],
|
1162 |
progress=self.params["progress"],
|
1163 |
timeout_in_seconds=self.params["timeout_in_seconds"],
|
1164 |
+
crossoverProbability=self.params["crossoverProbability"],
|
1165 |
)
|
1166 |
|
1167 |
np_dtype = {16: np.float16, 32: np.float32, 64: np.float64}[
|
pysr/version.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
__version__ = "0.7.
|
2 |
-
__symbolic_regression_jl_version__ = "0.7.
|
|
|
1 |
+
__version__ = "0.7.7"
|
2 |
+
__symbolic_regression_jl_version__ = "0.7.10"
|