Spaces:
Sleeping
Sleeping
Commit
·
a9212fa
1
Parent(s):
a05a888
Update README example
Browse files- README.md +2 -0
- example.py +1 -2
README.md
CHANGED
|
@@ -98,8 +98,10 @@ model = PySRRegressor(
|
|
| 98 |
"cos",
|
| 99 |
"exp",
|
| 100 |
"sin",
|
|
|
|
| 101 |
],
|
| 102 |
model_selection="best",
|
|
|
|
| 103 |
)
|
| 104 |
```
|
| 105 |
This will set up the model for 5 iterations of the search code, which contains hundreds of thousands of mutations and equation evaluations.
|
|
|
|
| 98 |
"cos",
|
| 99 |
"exp",
|
| 100 |
"sin",
|
| 101 |
+
"inv(x) = 1/x", # Custom operator (julia syntax)
|
| 102 |
],
|
| 103 |
model_selection="best",
|
| 104 |
+
loss="loss(x, y) = (x - y)^2", # Custom loss function (julia syntax)
|
| 105 |
)
|
| 106 |
```
|
| 107 |
This will set up the model for 5 iterations of the search code, which contains hundreds of thousands of mutations and equation evaluations.
|
example.py
CHANGED
|
@@ -13,11 +13,10 @@ model = PySRRegressor(
|
|
| 13 |
"cos",
|
| 14 |
"exp",
|
| 15 |
"sin",
|
| 16 |
-
"inv(x)=1/x", # Custom operator (julia syntax)
|
| 17 |
],
|
| 18 |
model_selection="best",
|
| 19 |
loss="loss(x, y) = (x - y)^2", # Custom loss function (julia syntax)
|
| 20 |
-
multithreading=False,
|
| 21 |
)
|
| 22 |
|
| 23 |
model.fit(X, y)
|
|
|
|
| 13 |
"cos",
|
| 14 |
"exp",
|
| 15 |
"sin",
|
| 16 |
+
"inv(x) = 1/x", # Custom operator (julia syntax)
|
| 17 |
],
|
| 18 |
model_selection="best",
|
| 19 |
loss="loss(x, y) = (x - y)^2", # Custom loss function (julia syntax)
|
|
|
|
| 20 |
)
|
| 21 |
|
| 22 |
model.fit(X, y)
|