MilesCranmer commited on
Commit
170419e
1 Parent(s): 2ca2654

Iterate version

Browse files
Files changed (3) hide show
  1. README.md +1 -0
  2. benchmarks/benchmark.sh +3 -1
  3. setup.py +1 -1
README.md CHANGED
@@ -305,6 +305,7 @@ pd.DataFrame, Results dataframe, giving complexity, MSE, and equations
305
  - [x] Try @spawn over each sub-population. Do random sort, compute mutation for each, then replace 10% oldest.
306
  - [x] Control max depth, rather than max number of nodes?
307
  - [x] Allow user to pass names for variables - use these when printing
 
308
  - [ ] Sort these todo lists by priority
309
 
310
  ## Feature ideas
 
305
  - [x] Try @spawn over each sub-population. Do random sort, compute mutation for each, then replace 10% oldest.
306
  - [x] Control max depth, rather than max number of nodes?
307
  - [x] Allow user to pass names for variables - use these when printing
308
+ - [x] Check for domain errors in an equation quickly before actually running the entire array over it. (We do this now recursively - every single equation is checked for nans/infs when being computed.)
309
  - [ ] Sort these todo lists by priority
310
 
311
  ## Feature ideas
benchmarks/benchmark.sh CHANGED
@@ -6,7 +6,9 @@ import numpy as np
6
  from pysr import pysr
7
  X=np.random.randn(100, 2)*5
8
  y=2*np.sin((X[:, 0]+X[:, 1]))*np.exp(X[:, 1]/3)
9
- if version[1] >= 3 and version[2] >= 17:
 
 
10
  eq = pysr(X, y, binary_operators=["plus", "mult", "div", "pow"], unary_operators=["sin"], niterations=20, procs=4, parsimony=1e-10, npop=1000, ncyclesperiteration=1000, maxdepth=6, fast_cycle=True)
11
  elif version[1] >= 3 and version[2] >= 16:
12
  eq = pysr(X, y, binary_operators=["plus", "mult", "div", "pow"], unary_operators=["sin"], niterations=20, procs=4, parsimony=1e-10, npop=1000, ncyclesperiteration=1000, maxdepth=6)
 
6
  from pysr import pysr
7
  X=np.random.randn(100, 2)*5
8
  y=2*np.sin((X[:, 0]+X[:, 1]))*np.exp(X[:, 1]/3)
9
+ if version[1] >= 3 and version[2] >= 20:
10
+ eq = pysr(X, y, binary_operators=["plus", "mult", "div", "pow"], unary_operators=["sin"], niterations=20, procs=4, parsimony=1e-10, npop=1000, ncyclesperiteration=1000, maxdepth=6, fast_cycle=True, batching=True, batchSize=50)
11
+ elif version[1] >= 3 and version[2] >= 17:
12
  eq = pysr(X, y, binary_operators=["plus", "mult", "div", "pow"], unary_operators=["sin"], niterations=20, procs=4, parsimony=1e-10, npop=1000, ncyclesperiteration=1000, maxdepth=6, fast_cycle=True)
13
  elif version[1] >= 3 and version[2] >= 16:
14
  eq = pysr(X, y, binary_operators=["plus", "mult", "div", "pow"], unary_operators=["sin"], niterations=20, procs=4, parsimony=1e-10, npop=1000, ncyclesperiteration=1000, maxdepth=6)
setup.py CHANGED
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
 
6
  setuptools.setup(
7
  name="pysr", # Replace with your own username
8
- version="0.3.19",
9
  author="Miles Cranmer",
10
  author_email="[email protected]",
11
  description="Simple and efficient symbolic regression",
 
5
 
6
  setuptools.setup(
7
  name="pysr", # Replace with your own username
8
+ version="0.3.20",
9
  author="Miles Cranmer",
10
  author_email="[email protected]",
11
  description="Simple and efficient symbolic regression",