data-analysisopen-sourcephysicsastronomycross-disciplinary
Data AnalysisOpen Source🔓 open source

PySR

PySR searches for compact equations that fit data. The most interesting measurement is often where two candidate curves part company.


Two equations describe the spring on your bench. One has an extra term and wins on the measured displacements by a whisker. Extend the curves on paper and they start to pull apart. At last, the equations have given you a reason to take one particular measurement.

Read the candidates between the best and simplest

Mark the fitted range and compare both expressions with held-out measurements at larger displacements. Examine the units and sign of the extra term. Does it describe behaviour that a spring could exhibit under the assumed conditions, or just flatter a few noisy points?

Keep the simpler expression in the results table with complexity and held-out error beside each candidate. A reader can now see why the smallest training error didn’t necessarily settle the choice. PySR project

What it does

PySR performs symbolic regression using a Julia-backed search over mathematical expressions. The project is maintained in the astroautomata organization, and the allowed operators, constraints and error measure influence what it finds.

Use it for

Use it when a readable equation is worth investigating alongside a predictive fit. Save the software version, search settings, seeds and chosen expressions so a colleague can examine competing answers.

Limitations

A fitted term can reflect correlated inputs or a limited measurement range. Establishing a physical mechanism requires evidence beyond the equation’s agreement with the training points.

Access and pricingThe official open-source repository documents installation and dependencies. Save the package version, search settings, random seeds and chosen expression.
Sources checked: 2026-11-15

Original reference