Spaces:
Running
Running
Temporarily hide conda-forge install
Browse files- Until the conda install is stable again
README.md
CHANGED
|
@@ -4,18 +4,13 @@
|
|
| 4 |
|
| 5 |
PySR searches for symbolic expressions which optimize a particular objective.
|
| 6 |
|
| 7 |
-
https://github.com/MilesCranmer/PySR/assets/7593028/c8511a49-b408-488f-8f18-b1749078268f
|
| 8 |
-
|
| 9 |
|
| 10 |
# PySR: High-Performance Symbolic Regression in Python and Julia
|
| 11 |
|
| 12 |
-
| **Docs** | **Forums** | **Paper** | **colab demo** |
|
| 13 |
-
|
| 14 |
-
|[](https://astroautomata.com/PySR/)|[](https://github.com/MilesCranmer/PySR/discussions)|[](https://arxiv.org/abs/2305.01582)|[](https://colab.research.google.com/github/MilesCranmer/PySR/blob/master/examples/pysr_demo.ipynb)|
|
| 15 |
-
|
| 16 |
-
| **pip** | **conda** | **Stats** |
|
| 17 |
-
| :---: | :---: | :---: |
|
| 18 |
-
|[](https://badge.fury.io/py/pysr)|[](https://anaconda.org/conda-forge/pysr)|<div align="center">pip: [](https://badge.fury.io/py/pysr)<br>conda: [](https://anaconda.org/conda-forge/pysr)</div>|
|
| 19 |
|
| 20 |
</div>
|
| 21 |
|
|
@@ -121,41 +116,24 @@ python interface.
|
|
| 121 |
|
| 122 |
## Installation
|
| 123 |
|
| 124 |
-
| [pip](#pip) | [conda](#conda) | [docker](#docker-build) |
|
| 125 |
-
|:---:|:---:|:---:|
|
| 126 |
-
| Everywhere (recommended) | Linux and Intel-based macOS | Everywhere (if all else fails) |
|
| 127 |
-
|
| 128 |
-
---
|
| 129 |
|
| 130 |
### pip
|
| 131 |
|
| 132 |
1. [Install Julia](https://julialang.org/downloads/)
|
| 133 |
- Alternatively, my personal preference is to use [juliaup](https://github.com/JuliaLang/juliaup#installation), which performs this automatically.
|
| 134 |
2. Then, run:
|
|
|
|
| 135 |
```bash
|
| 136 |
pip3 install -U pysr
|
| 137 |
```
|
| 138 |
-
3. Finally, to install Julia dependencies:
|
| 139 |
-
```bash
|
| 140 |
-
python3 -m pysr install
|
| 141 |
-
```
|
| 142 |
-
> (Alternatively, from within Python, you can call `import pysr; pysr.install()`)
|
| 143 |
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
### conda
|
| 147 |
-
|
| 148 |
-
The PySR build in conda includes all required dependencies, so you can install it by simply running:
|
| 149 |
|
| 150 |
```bash
|
| 151 |
-
|
| 152 |
```
|
| 153 |
|
| 154 |
-
from within
|
| 155 |
-
|
| 156 |
-
However, note that the conda install does not support precompilation of Julia libraries, so the
|
| 157 |
-
start time may be slightly slower as the JIT-compilation will be running.
|
| 158 |
-
(Once the compilation finishes, there will not be a performance difference though.)
|
| 159 |
|
| 160 |
---
|
| 161 |
|
|
@@ -163,10 +141,13 @@ start time may be slightly slower as the JIT-compilation will be running.
|
|
| 163 |
|
| 164 |
1. Clone this repo.
|
| 165 |
2. In the repo, run the build command with:
|
|
|
|
| 166 |
```bash
|
| 167 |
docker build -t pysr .
|
| 168 |
```
|
|
|
|
| 169 |
3. You can then start the container with an IPython execution with:
|
|
|
|
| 170 |
```bash
|
| 171 |
docker run -it --rm pysr ipython
|
| 172 |
```
|
|
@@ -251,13 +232,13 @@ to print the learned equations:
|
|
| 251 |
|
| 252 |
```python
|
| 253 |
PySRRegressor.equations_ = [
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
]
|
| 262 |
```
|
| 263 |
|
|
|
|
| 4 |
|
| 5 |
PySR searches for symbolic expressions which optimize a particular objective.
|
| 6 |
|
| 7 |
+
<https://github.com/MilesCranmer/PySR/assets/7593028/c8511a49-b408-488f-8f18-b1749078268f>
|
|
|
|
| 8 |
|
| 9 |
# PySR: High-Performance Symbolic Regression in Python and Julia
|
| 10 |
|
| 11 |
+
| **Docs** | **pip** | **Forums** | **Paper** | **colab demo** |
|
| 12 |
+
|:---:|:---:|:---:|:---:|:---:|
|
| 13 |
+
|[](https://astroautomata.com/PySR/)|[](https://badge.fury.io/py/pysr)|[](https://github.com/MilesCranmer/PySR/discussions)|[](https://arxiv.org/abs/2305.01582)|[](https://colab.research.google.com/github/MilesCranmer/PySR/blob/master/examples/pysr_demo.ipynb)|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
</div>
|
| 16 |
|
|
|
|
| 116 |
|
| 117 |
## Installation
|
| 118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
|
| 120 |
### pip
|
| 121 |
|
| 122 |
1. [Install Julia](https://julialang.org/downloads/)
|
| 123 |
- Alternatively, my personal preference is to use [juliaup](https://github.com/JuliaLang/juliaup#installation), which performs this automatically.
|
| 124 |
2. Then, run:
|
| 125 |
+
|
| 126 |
```bash
|
| 127 |
pip3 install -U pysr
|
| 128 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
|
| 130 |
+
3. Finally, to install Julia dependencies:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
|
| 132 |
```bash
|
| 133 |
+
python3 -m pysr install
|
| 134 |
```
|
| 135 |
|
| 136 |
+
> (Alternatively, from within Python, you can call `import pysr; pysr.install()`)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
|
| 138 |
---
|
| 139 |
|
|
|
|
| 141 |
|
| 142 |
1. Clone this repo.
|
| 143 |
2. In the repo, run the build command with:
|
| 144 |
+
|
| 145 |
```bash
|
| 146 |
docker build -t pysr .
|
| 147 |
```
|
| 148 |
+
|
| 149 |
3. You can then start the container with an IPython execution with:
|
| 150 |
+
|
| 151 |
```bash
|
| 152 |
docker run -it --rm pysr ipython
|
| 153 |
```
|
|
|
|
| 232 |
|
| 233 |
```python
|
| 234 |
PySRRegressor.equations_ = [
|
| 235 |
+
pick score equation loss complexity
|
| 236 |
+
0 0.000000 4.4324794 42.354317 1
|
| 237 |
+
1 1.255691 (x0 * x0) 3.437307 3
|
| 238 |
+
2 0.011629 ((x0 * x0) + -0.28087974) 3.358285 5
|
| 239 |
+
3 0.897855 ((x0 * x0) + cos(x3)) 1.368308 6
|
| 240 |
+
4 0.857018 ((x0 * x0) + (cos(x3) * 2.4566472)) 0.246483 8
|
| 241 |
+
5 >>>> inf (((cos(x3) + -0.19699033) * 2.5382123) + (x0 *... 0.000000 10
|
| 242 |
]
|
| 243 |
```
|
| 244 |
|