Skip to content

v1.5.1

Latest

Choose a tag to compare

@github-actions github-actions released this 28 Jul 18:01

PlotTracer 1.5.1

One fix: a curve fit through a flat series reported R² = 1.00000 — a
perfect score for a model that explained nothing.

Why it happened

R² is 1 − SSres/SStot, where SStot is how much the data varies about its own
mean — how much there was to explain in the first place. When every value in a
series is the same, SStot is exactly zero: every point is the mean. The ratio
divides by zero, and R² has no value at all.

The code returned 1 in that case. That was not a rounding artifact — the
residual never entered the calculation, so the 1 would have been identical had
the fit been wildly wrong. It was a written-in default standing where the formula
has no answer.

What it looked like

Fitting a horizontal baseline — an ordinary thing to trace: a control series that
doesn't move, a saturated plateau — printed R² = 1.00000 on the Curve fit card,
and wrote 1 into the R2 column of every export. On a nonlinear model it could
appear directly beside the red "this fit did not settle", which is a contradiction
the app should never show.

What it does now

R² is reported as absent when the series has no variation:

  • the card shows R² = — and says why: R² needs variation to measure against, and
    every value in this series is the same
  • the R2 column exports a blank cell, never a fabricated number — the same
    rule PlotTracer already applies to any value that was not measured
  • JSON omits rSquared rather than nulling it, matching the schema's
    convention that an absent field means the thing does not apply

RMS is unaffected and is the number to read there. It needs no reference
variance, it is in the data's own units, and it was honest all along.

Unchanged on purpose: a negative R² on a genuinely poor nonlinear fit is
correct and still reported — for a nonlinear model R² is not a proportion of
explained variance and is not bounded below by zero. Only the zero-variance case
became absent.

Downloads

Installers for Linux (.AppImage, .deb), macOS (Apple Silicon .dmg) and
Windows (.exe) are attached below.

These builds are unsigned. macOS will need Right-click → Open the first time,
and Windows will show a SmartScreen warning — choose More info → Run anyway.

Full Changelog: v1.5.0...v1.5.1