AutonLabTruth commited on
Commit
35b3043
1 Parent(s): 9e11722

Created a main.py file to run

Browse files
Files changed (1) hide show
  1. main.py +15 -0
main.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ from pysr import pysr, best, get_hof
3
+
4
+ # Dataset
5
+ X = 2*np.random.randn(100, 5)
6
+ y = 2*np.cos(X[:, 3]) + X[:, 0]**2 - 2
7
+
8
+ # Learn equations
9
+ equations = pysr(X, y, niterations=5,
10
+ binary_operators=["plus", "mult"],
11
+ unary_operators=["cos", "exp", "sin"])
12
+
13
+ ... # (you can use ctl-c to exit early)
14
+
15
+ print(best(equations))