hn.today

Symbolic Learning in Python and Julia

github.com3 points1 comments
Screenshot of Symbolic Learning in Python and Julia

PySR is an open-source symbolic regression library that uses a Julia-based evolutionary search engine to discover interpretable symbolic expressions that fit data. It targets low-dimensional problems directly and supports "symbolic distillation" to extract analytic formulas from neural networks for higher-dimensional tasks. The interface follows scikit-learn conventions via PySRRegressor, producing a ranked hall of fame of candidate equations with scores, loss, and complexity. Discovered formulas are exported in multiple callable formats (plain lambda, SymPy) and in differentiable forms for JAX and PyTorch, enabling further analysis, differentiation, or integration into pipelines. Warm-started searches, model selection, and an explicit equation table let users inspect, select, and reuse prior search state.

Installation and deployment are straightforward via pip or conda, with Docker and Apptainer recipes for containerized or cluster use. The search is highly configurable: populations, population_size, niterations, ncycles_per_iteration, timeout and early_stop rules, maxsize/maxdepth, custom binary/unary operators, per-operator constraints and nested constraints. Practical features include denoising, feature selection, saving/loading hall_of_fame CSV/PKL, and a from_file loader. Troubleshooting notes cover common binary library conflicts (GLIBCXX) and fixing LD_LIBRARY_PATH to Julia libraries. Documentation, examples, and an arXiv citation (2305.01582) accompany the project for deeper study.

Read on github.com1 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in AI

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.