Spaces:
Running
Running
Merge branch 'master' into recover
Browse files- .travis.yml +0 -4
- README.md +4 -1
- pysr/sr.py +6 -1
- setup.py +1 -1
.travis.yml
CHANGED
|
@@ -9,10 +9,6 @@ jobs:
|
|
| 9 |
dist: bionic
|
| 10 |
before_install: sudo apt-get -y install python3-pip python3-setuptools
|
| 11 |
env: PY=python3 SETUPPREFIX="--user"
|
| 12 |
-
- name: "macOS"
|
| 13 |
-
os: osx
|
| 14 |
-
before_install: python3 --version; pip3 --version; sw_vers
|
| 15 |
-
env: PY=python3
|
| 16 |
- name: "Windows"
|
| 17 |
os: windows
|
| 18 |
before_install:
|
|
|
|
| 9 |
dist: bionic
|
| 10 |
before_install: sudo apt-get -y install python3-pip python3-setuptools
|
| 11 |
env: PY=python3 SETUPPREFIX="--user"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
- name: "Windows"
|
| 13 |
os: windows
|
| 14 |
before_install:
|
README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
# [PySR
|
| 2 |
|
| 3 |
(pronounced like *py* as in python, and then *sur* as in surface)
|
| 4 |
|
|
@@ -13,6 +13,9 @@ Uses regularized evolution, simulated annealing, and gradient-free optimization.
|
|
| 13 |
|
| 14 |
[Documentation](https://pysr.readthedocs.io/en/latest)
|
| 15 |
|
|
|
|
|
|
|
|
|
|
| 16 |
Symbolic regression is a very interpretable machine learning algorithm
|
| 17 |
for low-dimensional problems: these tools search equation space
|
| 18 |
to find algebraic relations that approximate a dataset.
|
|
|
|
| 1 |
+
# [PySR](https://github.com/MilesCranmer/PySR)
|
| 2 |
|
| 3 |
(pronounced like *py* as in python, and then *sur* as in surface)
|
| 4 |
|
|
|
|
| 13 |
|
| 14 |
[Documentation](https://pysr.readthedocs.io/en/latest)
|
| 15 |
|
| 16 |
+
Check out [SymbolicRegression.jl](https://github.com/MilesCranmer/SymbolicRegression.jl) for
|
| 17 |
+
the pure-Julia version of this package.
|
| 18 |
+
|
| 19 |
Symbolic regression is a very interpretable machine learning algorithm
|
| 20 |
for low-dimensional problems: these tools search equation space
|
| 21 |
to find algebraic relations that approximate a dataset.
|
pysr/sr.py
CHANGED
|
@@ -11,6 +11,7 @@ import tempfile
|
|
| 11 |
import shutil
|
| 12 |
from pathlib import Path
|
| 13 |
from datetime import datetime
|
|
|
|
| 14 |
|
| 15 |
|
| 16 |
global_equation_file = 'hall_of_fame.csv'
|
|
@@ -202,9 +203,13 @@ def pysr(X=None, y=None, weights=None,
|
|
| 202 |
if len(X.shape) == 1:
|
| 203 |
X = X[:, None]
|
| 204 |
|
| 205 |
-
|
| 206 |
use_custom_variable_names, variable_names, weights, y)
|
| 207 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 208 |
X, variable_names = handle_feature_selection(
|
| 209 |
X, select_k_features,
|
| 210 |
use_custom_variable_names, variable_names, y
|
|
|
|
| 11 |
import shutil
|
| 12 |
from pathlib import Path
|
| 13 |
from datetime import datetime
|
| 14 |
+
import warnings
|
| 15 |
|
| 16 |
|
| 17 |
global_equation_file = 'hall_of_fame.csv'
|
|
|
|
| 203 |
if len(X.shape) == 1:
|
| 204 |
X = X[:, None]
|
| 205 |
|
| 206 |
+
_check_assertions(X, binary_operators, unary_operators,
|
| 207 |
use_custom_variable_names, variable_names, weights, y)
|
| 208 |
|
| 209 |
+
|
| 210 |
+
if len(X) > 10000 and not batching:
|
| 211 |
+
warnings.warn("Note: you are running with more than 10,000 datapoints. You should consider turning on batching (https://pysr.readthedocs.io/en/latest/docs/options/#batching). You should also reconsider if you need that many datapoints. Unless you have a large amount of noise (in which case you should smooth your dataset first), generally < 10,000 datapoints is enough to find a functional form with symbolic regression. More datapoints will lower the search speed.")
|
| 212 |
+
|
| 213 |
X, variable_names = handle_feature_selection(
|
| 214 |
X, select_k_features,
|
| 215 |
use_custom_variable_names, variable_names, y
|
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.
|
| 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.3.37",
|
| 9 |
author="Miles Cranmer",
|
| 10 |
author_email="miles.cranmer@gmail.com",
|
| 11 |
description="Simple and efficient symbolic regression",
|