PySR is a symbolic regression tool that discovers interpretable mathematical equations from data using evolutionary algorithms implemented in Python and Julia.
The tool addresses the problem of finding explicit symbolic expressions that fit data while remaining human-readable, which contrasts with black-box machine learning models. It uses a genetic algorithm-based search engine built in Julia and exposed through a Python interface. The approach is designed for interpretability: symbolic regression produces equations that can be analyzed directly, and the tool extends this capability to neural networks through symbolic distillation, allowing conversion of trained deep learning models into analytical equations for inspection and understanding.
PySR suits projects where interpretability matters more than maximum predictive accuracy, particularly those working with low-dimensional datasets where symbolic solutions are feasible. The tool is configurable for different search strategies and objectives, and integrates with the scikit-learn ecosystem. It supports distributed computation across multiple processes and machines for scaling searches. Users working with high-dimensional data can apply symbolic distillation to first train a neural network, then extract symbolic approximations of its behavior.
The project maintains active engagement with users through a discussion forum and accepts contributions documenting applications. Development prioritizes performance optimization and configurability alongside usability, with the Julia backend receiving parallel development to improve the search engine's capabilities.