Keplearn is a deterministic symbolic-regression program written in Rust that tries to recover compact equations from tabular measurements. It reads CSV or TSV data from standard input, identifies a target column, and returns candidate equations as JSON. Its central aim is finding exact analytic laws quickly, not fitting arbitrary curves: the same input yields byte-for-byte identical output, and a timeout can limit difficult searches. The reported R² is recalculated from the final printed equation. The tool can also return several candidates, sample rows, and provide diagnostics separately from its JSON output.
Its search works by repeatedly applying invertible reductions to the target, such as dividing out a fitted factor or undoing logarithmic, square-root, or arcsine transforms. It tests affine monomials, sparse sums, and selected composite forms, ranks candidates using holdout performance and a complexity penalty, and verifies proposed rational or π-, e-, and √2-based constant simplifications before retaining them. In SRBench tests, it recovered known equations for 64.7% of noise-free Feynman problems and 42.9% of Strogatz problems, outperforming the cited published Feynman rate while using a 60-second per-fit cap. Many noise-free cases finished rapidly, but noisy fits often hit the cap. On black-box datasets, median test R² was near zero, reflecting its focus on discovering exact laws rather than general-purpose prediction.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.