MilesCranmer commited on
Commit
5f486e9
1 Parent(s): ba42fd1

Update operators list

Browse files
Files changed (3) hide show
  1. Project.toml +1 -1
  2. pysr/sr.py +10 -9
  3. setup.py +1 -1
Project.toml CHANGED
@@ -2,5 +2,5 @@
2
  SymbolicRegression = "8254be44-1295-4e6a-a16d-46603ac705cb"
3
 
4
  [compat]
5
- SymbolicRegression = "0.5.13"
6
  julia = "1.5"
 
2
  SymbolicRegression = "8254be44-1295-4e6a-a16d-46603ac705cb"
3
 
4
  [compat]
5
+ SymbolicRegression = "0.5.14"
6
  julia = "1.5"
pysr/sr.py CHANGED
@@ -22,7 +22,7 @@ global_extra_sympy_mappings = {}
22
  sympy_mappings = {
23
  'div': lambda x, y : x/y,
24
  'mult': lambda x, y : x*y,
25
- 'sqrtm':lambda x : sympy.sqrt(abs(x)),
26
  'square':lambda x : x**2,
27
  'cube': lambda x : x**3,
28
  'plus': lambda x, y : x + y,
@@ -46,10 +46,10 @@ sympy_mappings = {
46
  'mod': lambda x, y : sympy.Mod(x, y),
47
  'erf': lambda x : sympy.erf(x),
48
  'erfc': lambda x : sympy.erfc(x),
49
- 'logm': lambda x : sympy.log(abs(x)),
50
- 'logm10':lambda x : sympy.log(abs(x), 10),
51
- 'logm2': lambda x : sympy.log(abs(x), 2),
52
- 'log1p': lambda x : sympy.log(x + 1),
53
  'floor': lambda x : sympy.floor(x),
54
  'ceil': lambda x : sympy.ceil(x),
55
  'sign': lambda x : sympy.sign(x),
@@ -475,10 +475,11 @@ square=SymbolicRegression.square
475
  cube=SymbolicRegression.cube
476
  pow=(^)
477
  div=(/)
478
- logm=SymbolicRegression.logm
479
- logm2=SymbolicRegression.logm2
480
- logm10=SymbolicRegression.logm10
481
- sqrtm=SymbolicRegression.sqrtm
 
482
  neg=SymbolicRegression.neg
483
  greater=SymbolicRegression.greater
484
  relu=SymbolicRegression.relu
 
22
  sympy_mappings = {
23
  'div': lambda x, y : x/y,
24
  'mult': lambda x, y : x*y,
25
+ 'sqrt_abs':lambda x : sympy.sqrt(abs(x)),
26
  'square':lambda x : x**2,
27
  'cube': lambda x : x**3,
28
  'plus': lambda x, y : x + y,
 
46
  'mod': lambda x, y : sympy.Mod(x, y),
47
  'erf': lambda x : sympy.erf(x),
48
  'erfc': lambda x : sympy.erfc(x),
49
+ 'log_abs': lambda x : sympy.log(abs(x)),
50
+ 'log10_abs':lambda x : sympy.log(abs(x), 10),
51
+ 'log2_abs': lambda x : sympy.log(abs(x), 2),
52
+ 'log1p_abs': lambda x : sympy.log(abs(x) + 1),
53
  'floor': lambda x : sympy.floor(x),
54
  'ceil': lambda x : sympy.ceil(x),
55
  'sign': lambda x : sympy.sign(x),
 
475
  cube=SymbolicRegression.cube
476
  pow=(^)
477
  div=(/)
478
+ log_abs=SymbolicRegression.log_abs
479
+ log2_abs=SymbolicRegression.log2_abs
480
+ log10_abs=SymbolicRegression.log10_abs
481
+ log1p_abs=SymbolicRegression.log1p_abs
482
+ sqrt_abs=SymbolicRegression.sqrt_abs
483
  neg=SymbolicRegression.neg
484
  greater=SymbolicRegression.greater
485
  relu=SymbolicRegression.relu
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.5.13-2",
9
  author="Miles Cranmer",
10
  author_email="miles.cranmer@gmail.com",
11
  description="Simple and efficient symbolic regression",
 
5
 
6
  setuptools.setup(
7
  name="pysr", # Replace with your own username
8
+ version="0.5.14",
9
  author="Miles Cranmer",
10
  author_email="miles.cranmer@gmail.com",
11
  description="Simple and efficient symbolic regression",