Installing and running PySR problems in Jupyter #549
Replies: 3 comments
-
Need to add: from pysr import PySRRegressor Also I would recommend installing the updated version of PySR which is 0.17.1 |
Beta Was this translation helpful? Give feedback.
-
Sorry to bother but I tried the following code in Jupyter (in that order) but got the following error message PS: my goal is to try PySR on some clinical data to predict the quality of life score (range -0.319 to 1) from a number of clinical determinants in a sample of cancer patients |
Beta Was this translation helpful? Give feedback.
-
I recommend starting from the example notebook here: https://github.com/MilesCranmer/PySR/blob/master/examples/pysr_demo.ipynb (i.e., download and use that one) which walks you through how to set it up. You can run it in your browser here: https://colab.research.google.com/github/MilesCranmer/PySR/blob/master/examples/pysr_demo.ipynb |
Beta Was this translation helpful? Give feedback.
-
Hi I am new to Python and trying to install PySR through Jupyter
So I installed first Python3 though Anaconda, then downloaded Julia through Juliaup in my user directory
C:\Users\Ralph.julia.
This generated a number of subdirectories with the following file included in the juliaup subdirectory :julia-1.10.1+0.x64.w64.mingw32 and pysr 0.16.9 in the environments subdirectory
I then created a jupyter notebook file where I !pip installed numpy, pandas,sympy and matplotlib
followed in a new cell by import pysr; pysr.install -m (install()) as mentioned in the pysr installation document
I then ran the published test code in the Python default environment and got the following ERROR, furthermore the Kernel seemed to terminate also during the run
#PYSR data simulation
X = np.linspace(0, 10, 100).reshape(-1, 1)
y = np.sin(X).ravel() + np.random.normal(0, 0.5, X.shape[0])
running symbolic regression and show equations
model = PySRRegressor(niterations=100, binary_operators=["+", "-", "*", "/"])
model.fit(X, y)
print(model)
---------------------------------------------------------------------------
Can someone point out if there was an error in my installation process ?Do I need to use another way to install pySR, if yes which one exactly in Jupyter ?
I am running Jupyter in Windows10,
What should the Windows PAth look like after Julia installation ? to which directory or file should it exactly point to ?
this is my current Windows user PATH: C:\Users\Ralph.julia\juliaup\julia-1.10.1+0.x64.w64.mingw32\bin
Beta Was this translation helpful? Give feedback.
All reactions