Closed tbuckworth closed 6 months ago
I updated to pysr==0.18.1, but the problem persists
That is weird, it seems like greater
is missing its sympy mapping:
So you could pass this to extra_sympy_mappings
of the PySRRegressor, like
extra_sympy_mappings={"greater": lambda x, y: sympy.Piecewise((1.0, x > y), (0.0, True))}
but ideally we should have it built-in since greater
is documented as an available operator.
Brilliant! That fixed it, thank you
What happened?
model.fit fails due to pickle error when using binary operator "greater".
Here is a minimal example:
If I replace "greater" with "cond" then no error is thrown. I've tried on different datastets etc., but if 'greater' is used in an equation, then this error is thrown.
Python=3.8 pysr=0.17.2
Version
0.17.2
Operating System
Linux
Package Manager
pip
Interface
Script (i.e.,
python my_script.py
)Relevant log output
Extra Info
Someone here fixed a similar issue with this help: