MilesCranmer commited on
Commit
0428573
1 Parent(s): 2753bc9

Turn off symbolic utils

Browse files
Files changed (1) hide show
  1. pysr/sr.py +7 -1
pysr/sr.py CHANGED
@@ -348,7 +348,7 @@ def _write_project_file(tmp_dir):
348
  SymbolicRegression = "8254be44-1295-4e6a-a16d-46603ac705cb"
349
 
350
  [compat]
351
- SymbolicRegression = "0.7.6"
352
  julia = "1.5"
353
  """
354
 
@@ -420,6 +420,7 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
420
  Xresampled=None,
421
  precision=32,
422
  multithreading=None,
 
423
  **kwargs,
424
  ):
425
  """Initialize settings for an equation search in PySR.
@@ -534,12 +535,15 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
534
  :type tournament_selection_p: float
535
  :param precision: What precision to use for the data. By default this is 32 (float32), but you can select 64 or 16 as well.
536
  :type precision: int
 
 
537
  :param **kwargs: Other options passed to SymbolicRegression.Options, for example, if you modify SymbolicRegression.jl to include additional arguments.
538
  :type **kwargs: dict
539
  :returns: Initialized model. Call `.fit(X, y)` to fit your data!
540
  :type: PySRRegressor
541
  """
542
  super().__init__()
 
543
  self.model_selection = model_selection
544
 
545
  if binary_operators is None:
@@ -658,6 +662,7 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
658
  Xresampled=Xresampled,
659
  precision=precision,
660
  multithreading=multithreading,
 
661
  ),
662
  **kwargs,
663
  }
@@ -1146,6 +1151,7 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
1146
  perturbationFactor=self.params["perturbationFactor"],
1147
  annealing=self.params["annealing"],
1148
  stateReturn=True, # Required for state saving.
 
1149
  )
1150
 
1151
  np_dtype = {16: np.float16, 32: np.float32, 64: np.float64}[
 
348
  SymbolicRegression = "8254be44-1295-4e6a-a16d-46603ac705cb"
349
 
350
  [compat]
351
+ SymbolicRegression = "0.7.7"
352
  julia = "1.5"
353
  """
354
 
 
420
  Xresampled=None,
421
  precision=32,
422
  multithreading=None,
423
+ use_symbolic_utils=False,
424
  **kwargs,
425
  ):
426
  """Initialize settings for an equation search in PySR.
 
535
  :type tournament_selection_p: float
536
  :param precision: What precision to use for the data. By default this is 32 (float32), but you can select 64 or 16 as well.
537
  :type precision: int
538
+ :param use_symbolic_utils: Whether to use SymbolicUtils during simplification.
539
+ :type use_symbolic_utils: bool
540
  :param **kwargs: Other options passed to SymbolicRegression.Options, for example, if you modify SymbolicRegression.jl to include additional arguments.
541
  :type **kwargs: dict
542
  :returns: Initialized model. Call `.fit(X, y)` to fit your data!
543
  :type: PySRRegressor
544
  """
545
  super().__init__()
546
+ # TODO: Order args in docstring by order of declaration.
547
  self.model_selection = model_selection
548
 
549
  if binary_operators is None:
 
662
  Xresampled=Xresampled,
663
  precision=precision,
664
  multithreading=multithreading,
665
+ use_symbolic_utils=use_symbolic_utils,
666
  ),
667
  **kwargs,
668
  }
 
1151
  perturbationFactor=self.params["perturbationFactor"],
1152
  annealing=self.params["annealing"],
1153
  stateReturn=True, # Required for state saving.
1154
+ use_symbolic_utils=self.params["use_symbolic_utils"],
1155
  )
1156
 
1157
  np_dtype = {16: np.float16, 32: np.float32, 64: np.float64}[