Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
925dcc4
1
Parent(s):
f755fc9
Clean up readme
Browse files
README.md
CHANGED
@@ -73,15 +73,22 @@ import numpy as np
|
|
73 |
from pysr import pysr, best
|
74 |
|
75 |
# Dataset
|
76 |
-
X = 2*np.random.randn(100, 5)
|
77 |
-
y = 2*np.cos(X[:, 3]) + X[:, 0]**2 - 2
|
78 |
|
79 |
# Learn equations
|
80 |
-
equations = pysr(
|
81 |
-
|
|
|
|
|
|
|
82 |
unary_operators=[
|
83 |
-
|
84 |
-
|
|
|
|
|
|
|
|
|
85 |
|
86 |
...# (you can use ctl-c to exit early)
|
87 |
|
|
|
73 |
from pysr import pysr, best
|
74 |
|
75 |
# Dataset
|
76 |
+
X = 2 * np.random.randn(100, 5)
|
77 |
+
y = 2 * np.cos(X[:, 3]) + X[:, 0] ** 2 - 2
|
78 |
|
79 |
# Learn equations
|
80 |
+
equations = pysr(
|
81 |
+
X,
|
82 |
+
y,
|
83 |
+
niterations=5,
|
84 |
+
binary_operators=["+", "*"],
|
85 |
unary_operators=[
|
86 |
+
"cos",
|
87 |
+
"exp",
|
88 |
+
"sin", # Pre-defined library of operators (see docs)
|
89 |
+
"inv(x) = 1/x", # Define your own operator! (Julia syntax)
|
90 |
+
],
|
91 |
+
)
|
92 |
|
93 |
...# (you can use ctl-c to exit early)
|
94 |
|