MilesCranmer commited on
Commit
24b8a6f
2 Parent(s): ff874cd 5abd46e

Merge branch 'master' into custom-objectives

Browse files
Files changed (3) hide show
  1. docs/param_groupings.yml +1 -0
  2. pysr/sr.py +6 -0
  3. pysr/version.py +1 -1
docs/param_groupings.yml CHANGED
@@ -24,6 +24,7 @@
24
  - use_frequency
25
  - use_frequency_in_tournament
26
  - adaptive_parsimony_scaling
 
27
  - Mutations:
28
  - weight_add_node
29
  - weight_insert_node
 
24
  - use_frequency
25
  - use_frequency_in_tournament
26
  - adaptive_parsimony_scaling
27
+ - should_simplify
28
  - Mutations:
29
  - weight_add_node
30
  - weight_insert_node
pysr/sr.py CHANGED
@@ -456,6 +456,9 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
456
  topn : int
457
  How many top individuals migrate from each population.
458
  Default is `12`.
 
 
 
459
  should_optimize_constants : bool
460
  Whether to numerically optimize constants (Nelder-Mead/Newton)
461
  at the end of each iteration. Default is `True`.
@@ -727,6 +730,7 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
727
  migration=True,
728
  hof_migration=True,
729
  topn=12,
 
730
  should_optimize_constants=True,
731
  optimizer_algorithm="BFGS",
732
  optimizer_nrestarts=2,
@@ -780,6 +784,7 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
780
  self.constraints = constraints
781
  self.nested_constraints = nested_constraints
782
  self.warmup_maxsize_by = warmup_maxsize_by
 
783
  # - Early exit conditions:
784
  self.max_evals = max_evals
785
  self.timeout_in_seconds = timeout_in_seconds
@@ -1621,6 +1626,7 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
1621
  migration=self.migration,
1622
  hof_migration=self.hof_migration,
1623
  fraction_replaced_hof=self.fraction_replaced_hof,
 
1624
  should_optimize_constants=self.should_optimize_constants,
1625
  warmup_maxsize_by=self.warmup_maxsize_by,
1626
  use_frequency=self.use_frequency,
 
456
  topn : int
457
  How many top individuals migrate from each population.
458
  Default is `12`.
459
+ should_simplify : bool
460
+ Whether to use algebraic simplification in the search. Note that only
461
+ a few simple rules are implemented. Default is `True`.
462
  should_optimize_constants : bool
463
  Whether to numerically optimize constants (Nelder-Mead/Newton)
464
  at the end of each iteration. Default is `True`.
 
730
  migration=True,
731
  hof_migration=True,
732
  topn=12,
733
+ should_simplify=None,
734
  should_optimize_constants=True,
735
  optimizer_algorithm="BFGS",
736
  optimizer_nrestarts=2,
 
784
  self.constraints = constraints
785
  self.nested_constraints = nested_constraints
786
  self.warmup_maxsize_by = warmup_maxsize_by
787
+ self.should_simplify = should_simplify
788
  # - Early exit conditions:
789
  self.max_evals = max_evals
790
  self.timeout_in_seconds = timeout_in_seconds
 
1626
  migration=self.migration,
1627
  hof_migration=self.hof_migration,
1628
  fraction_replaced_hof=self.fraction_replaced_hof,
1629
+ should_simplify=self.should_simplify,
1630
  should_optimize_constants=self.should_optimize_constants,
1631
  warmup_maxsize_by=self.warmup_maxsize_by,
1632
  use_frequency=self.use_frequency,
pysr/version.py CHANGED
@@ -1,2 +1,2 @@
1
  __version__ = "0.12.1"
2
- __symbolic_regression_jl_version__ = "0.16.1"
 
1
  __version__ = "0.12.1"
2
+ __symbolic_regression_jl_version__ = "0.16.2"