3 comments

  • ziofill0 minutes ago
    The battery example makes no sense:<p>capacity_SOH ≈ 0.913 − 0.352 · tanh( cycle^((temperature&#x2F;cycle)^0.485) )<p>I understand this fits the data, but exponents should be dimensionless, what is temperature&#x2F;cycle?
  • gus_massa3 days ago
    Some minor comments:<p>What happens if you give the system not only the semi-mayor axis but also the semi-minor axis?<p>Have you tried with only the 6 planets Kepler know? (I don&#x27;t expect this to change the result too much.)<p>Have you tired with noisy data?
    • sade_952 days ago
      Good questions — I ran all three: Semi-minor axis: I added b as a second feature (b = a·sqrt(1−e²), so corr(a,b) = 1.00000 to 5 decimals; Mercury is the only planet where they differ by more than 2%). It still picked a and ignored b completely: T = 164.78·a·sqrt(a), R² = 0.99999998. What saves it on such a nasty collinear decoy is the constant fitting: the law is exact in a and only almost-exact in b, so Levenberg-Marquardt makes that 2% Mercury error decisive. Kepler&#x27;s 6 planets: works fine, and it&#x27;s actually nicer — it returned pow(a, 1.500812) explicitly. Six clean points on a power law is plenty. Noise: this is where I have to be honest. With 1% gaussian noise on T the fit is still R² = 0.9996 and a·sqrt(a) is still in there, but wrapped in junk (exp(tanh(...))). At 5% the clean form is gone — it returns a bounded exp(−a²) family that fits well but isn&#x27;t the law. So fit quality degrades gracefully, symbolic recovery doesn&#x27;t. Making that part noise-robust is pretty much the open frontier of the whole field, not just of my tool.
      • gus_massa1 day ago
        Remember to use two enters<p>to get a new paragraph here.<p>&gt; <i>b = a·sqrt(1−e²), so corr(a,b) = 1.00000 to 5 decimals</i><p>Isn&#x27;t e different for each planet?<p>&gt; <i>Mercury is the only planet where they differ by more than 2%</i><p>I remember something about Mars been the planet with the most eccentric elipse<p>&gt; *So fit quality degrades gracefully, symbolic recovery doesn&#x27;t. Making that part noise-robust is pretty much the open frontier of the whole field, not just of my tool.<p>Nice. It&#x27;s a hard problem. Which heuristic are you using to pick the &quot;best&quot; formula?
        • sade_951 day ago
          Thanks for the formatting tip, noted.<p>Isn&#x27;t e different for each planet?<p>Yes, each planet got its own e (Mercury 0.206, Venus 0.007, Earth 0.017...). The correlation still comes out at 1.00000 because all eccentricities are small while a spans 0.39 to 30 AU — a ≤2% per-planet wobble is invisible to Pearson across two decades of range. That&#x27;s exactly what makes it a nasty decoy: almost collinear, but not quite.<p>Mars been the planet with the most eccentric ellipse<p>Close — Mercury is actually the most eccentric (0.206), Mars is second (0.093). Funny enough, Mars is the famous one precisely because Kepler derived his laws fighting with Tycho&#x27;s Mars data: its ellipse was just eccentric enough to kill every circular fit. If Tycho had handed him Venus data instead, we might have waited a while longer.<p>Which heuristic are you using to pick the &quot;best&quot; formula?<p>Hold-out validation during evolution, then the old CART-style one-standard-error rule: pick the smallest formula whose validation error is within ~1 SE of the best one. Constants get refit with Levenberg-Marquardt before that comparison, so small forms compete at their best. It also returns the full accuracy-vs-size Pareto front so you can override the choice. And to connect it to your noise question: under noise that 1-SE band is exactly where wrong-but-simpler formulas sneak in and tie the true one — the two problems are really the same problem.
  • sade_955 days ago
    What My Project Does<p>GP_ELITE is a symbolic regression engine in pure Python: given (X, y) data, it searches for a readable mathematical formula linking them, instead of a black-box model.<p>To show what that means concretely: I gave it nothing but the 8 planets&#x27; distance from the Sun and orbital period — 8 data points — and asked for a formula. It returned:<p>T = a · sqrt(a) (i.e. a^1.5), R² = 1.000000<p>That&#x27;s Kepler&#x27;s Third Law (T² ∝ a³), which took Kepler ~10 years to find in 1618. GP_ELITE found it in ~3 seconds. Reproducible: examples&#x2F;kepler_demo.py.<p>v0.2.0 (this week) added the parts that make it reliable: Levenberg-Marquardt constant fitting (constants come back at machine precision — Coulomb&#x27;s q1·q2&#x2F;(4πεr²) is recovered exactly), multi-restart with a merged candidate archive, a Pareto front output (the full complexity ↔ accuracy staircase, not just one champion), and a guarded forecasting mode for extrapolating trends beyond your data without the usual GP blow-ups.<p>Pure Python&#x2F;NumPy — pip install gp-elite, no compiler, no Julia.<p>Target Audience<p>Anyone with small experimental datasets (≤10 variables, 100–5000 points) who wants to understand a relationship, not just predict it: lab engineers, scientists, students. One concrete use case that drove development: battery degradation (SOH) forecasting — the guarded mode gives you an honest bracket of scenarios (a Pareto front from a conservative straight line to richer bounded laws) instead of one overconfident curve. Production-usable for that niche (built-in hold-out validation, regression-tested); not aimed at large-scale ML.<p>Comparison<p>vs gplearn (the established pure-Python option): I ran both on the same frozen benchmark — 15 Feynman physics equations, identical data and splits, generous budget for gplearn. Exact symbolic recovery (machine precision): GP_ELITE 10&#x2F;15 (67%) vs gplearn 6&#x2F;15 (40%). gplearn recovers the constant-free formulas and stalls as soon as a ½ or a 4π appears (no real constant optimization); LM fitting is what closes that gap. Every number is reproducible: PYTHONHASHSEED=0 python benchmarks&#x2F;feynman_bench.py 0 15 and benchmarks&#x2F;duel.py in the repo.<p>vs PySR &#x2F; Operon (the state of the art): they are stronger on speed and scale, and I&#x27;m not claiming otherwise — but they require a Julia or C++ toolchain. GP_ELITE&#x27;s whole point is zero barrier: pip install and go.<p>vs neural nets &#x2F; gradient boosting: those win on raw accuracy for large data, but give you a black box — GP_ELITE gives you the actual equation.<p>Honest limits: weak on chaotic targets (tested on Collatz), degrades past ~6 variables with decoy features, and pure Python costs wall-time on big data.<p>Code (MIT): <a href="https:&#x2F;&#x2F;github.com&#x2F;ariel95500-create&#x2F;gp-elite" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ariel95500-create&#x2F;gp-elite</a>
    • srean1 hour ago
      This is not surprising at all and depends on the inductive bias hardcoded in the search.<p>There are infinite number of curves that agree on those 8 points and deviate from Kepler &#x27;s law everywhere else. On such &#x27;trajectories&#x27; this algorithm would have performed badly.
      • sade_9548 minutes ago
        You&#x27;re right, and I&#x27;d go further: the inductive bias isn&#x27;t incidental, it&#x27;s the whole product. Short trees over {+, *, sqrt, exp, ...} plus a parsimony penalty is basically Occam&#x27;s razor made executable. A bias-free learner can&#x27;t generalize at all (no free lunch), so the honest question is whether this particular bias matches the domain. For physics it has an unreasonably good track record though that&#x27;s the mystery of physics, not of my library. Two nuances though. The evidence here isn&#x27;t &quot;a curve fits 8 points&quot; infinitely many do, as you say. It&#x27;s that a 3-node formula fits them to machine precision (1−R² ≈ 1e-15). Under an MDL view that&#x27;s not nothing: the probability that such a short description nails 8 independent points exactly, if the truth were some unrelated wiggly curve, is astronomically small. The shortness is the evidence. Second: your adversarial curve would fool Kepler too, and any finite-data method ever. The practical mitigation is the boring one held-out validation, and in the planetary case, extrapolation: the law found on 8 planets keeps working on moons, asteroids and exoplanets. On the tool side I try to keep the failure mode visible rather than hidden: it returns the full accuracy-vs-complexity Pareto front, and the docs say plainly that noise breaks symbolic recovery long before it breaks fit quality. So yes: it finds simple laws when simple laws exist. When they don&#x27;t, it fails ideally loudly.