Skip to content

Curve fits and model comparison

relate_curve_fit

Fits one curve family to X and Y, such as exponential, power, sigmoid or polynomial.

Runs
Held: built, not on the server yet
Level
Checked against a reference: R 4.4.3 nls

Why it is held. A specific fault has been found in this tool. The next sentence says which inputs it affects and whether it can return a wrong number. It returns some numbers without the unit or the limit needed to read them, and this is being corrected (SCI-832).

From server 1.0.0 this tool is called stats_curve_fit. Until then it answers as relate_curve_fit.

Open in Drybench Assay

What it is

Required: unit (unspecified, replicates, rows, serial, technical). Fits one curve family by least squares (exponential growth, one- or two-phase exponential, power law, Boltzmann sigmoid, quadratic or cubic polynomial), or ranks several models by AICc through compare; family or compare is required. x0 is required for exponential families and compare. Profile or t intervals open only for replicate units, or row units with one value per row. AICc ranking is informational only.

Field: Statistics. It is the same calculation as Drybench Assay, called by an AI assistant through the server.

What it does

You give

  • x (required): X per row, in its own unit; null for a blank.
  • y (required): Y per row: a number, null (blank), or an array of replicate values for that row.
  • unit (required): What one point is (required; never inferred): 'replicates' (each replicate an independent unit), 'rows' (each row an independent unit, replicates technical: row means are used), 'serial' (serial reads of one unit), 'technical', or 'unspecified'. Inference needs 'replicates' or 'rows'.
  • xLabel: Optional name of X.
  • yLabel: Optional name of Y.
  • family: Single curve family to fit (supply family or compare, never both).

and 5 more, listed below

No request is shown while this tool is held.

Limits

  • Every computed number a reply returns, other than an integer or an exact decimal, is rounded once to 12 significant figures: to the nearest, a change of at most 5 × 10⁻¹² of its value, except that a lower bound is rounded down and an upper bound up, a change of less than 1 × 10⁻¹¹; the method computes, and decides any pass or fail, on the unrounded value.
  • No other limit is recorded for this tool.
Every input, with its units11 inputs
  • x (required): X per row, in its own unit; null for a blank.
  • y (required): Y per row: a number, null (blank), or an array of replicate values for that row.
  • unit (required): What one point is (required; never inferred): 'replicates' (each replicate an independent unit), 'rows' (each row an independent unit, replicates technical: row means are used), 'serial' (serial reads of one unit), 'technical', or 'unspecified'. Inference needs 'replicates' or 'rows'.
  • xLabel: Optional name of X.
  • yLabel: Optional name of Y.
  • family: Single curve family to fit (supply family or compare, never both).
  • label: One- or two-phase exponential direction label (default 'decay').
  • x0: Start X for exponential families (required for exponential families and compare).
  • plateau: Optional fixed plateau in Y unit for 'one-phase' family only.
  • compare: 2 to 10 distinct model keys to rank by AICc instead of fitting one family.
  • level: Confidence coverage level for intervals (0.9, 0.95 default, or 0.99).

The calculation

2 methods, each with its equations, constants and worked example.

Exponential, two-phase, power, Boltzmann and polynomial fits, with profile intervalsnonlinear-families@1.1.0

No equation is recorded for this version.

Kind of method: not recorded.

Worked example: not recorded for nonlinear-families@1.1.0.

ΔAICc across fitted models, extra-sum-of-squares F for nested pairsrelationship-model-comparison@1.0.0

No equation is recorded for this version.

Kind of method: not recorded.

Worked example: not recorded for relationship-model-comparison@1.0.0.

Sources

No source is recorded for this tool's methods.

How it is checked

Level

Checked against a reference, the lowest of its 2 methods.

Checked against

Exponential, two-phase, power, Boltzmann and polynomial fits, with profile intervals: R 4.4.3 nls (port) on the 29 curve cases of the 0.11.0 fixture (exponential growth, one-phase, two-phase, power and Boltzmann; polynomials in exact fractions): residual sums of squares within 1e-8 relative, ln parameters within 1e-6 absolute and the others within 1e-6 × max(|value|, span), noiseless fits within 1e-8, polynomials within 1e-9 relative, profile bounds within 1e-3 in ln or scaled units of a SciPy direct profile, side states and withheld states exact; SciPy 1.13.1 least_squares agrees on all 16 of the residual sums of squares it computes. Simulated coverage of the 95 percent profile intervals cleared on one design per family for growth, one-phase, two-phase, power and Boltzmann (2,000 replicates per family, every one estimable): every quantity covered at least 94.5 percent against a gate of 90 percent, with no side unresolved in the first 100 replicates' full profiles (2026-10-13). Intervals at 90 and 99 percent are not simulated.

ΔAICc across fitted models, extra-sum-of-squares F for nested pairs: R 4.4.3 (anova between nested pairs, AIC, and AICc on the residual-sum-of-squares form) on the 9 comparison cases of the 0.11.0 fixture: the ranking, the parameter counts, the models left out with their reasons, and the F pairs and labels exact; between linear models ΔAICc within 1e-8 absolute, F and p within 1e-8; with a nonlinear model ΔAICc within 1e-4 absolute, F within 1e-5 and p within 1e-4; withheld states exact (2026-10-13). No SciPy cross-check.

Cases

Exponential, two-phase, power, Boltzmann and polynomial fits, with profile intervals: No case set is linked to this version.

ΔAICc across fitted models, extra-sum-of-squares F for nested pairs: No case set is linked to this version.

Hostile inputs

Sent 118 malformed, extreme and misspelt calls. None broke it, and every call with an undeclared argument, or with text in place of a number or a true/false value, was declined with a reason.

Run 2026-11-12-2 of 12 November 2026, server 0.11.0.

Same answer

Called twice and with its arguments in another order, it gave the same result.

Run 2026-11-12-2 of 12 November 2026, server 0.11.0.

Not checked

Exponential, two-phase, power, Boltzmann and polynomial fits, with profile intervals: Not recorded. Its absence does not mean everything was checked.

ΔAICc across fitted models, extra-sum-of-squares F for nested pairs: Not recorded. Its absence does not mean everything was checked.

Open

A specific fault has been found in this tool. The next sentence says which inputs it affects and whether it can return a wrong number. It returns some numbers without the unit or the limit needed to read them, and this is being corrected (SCI-832).

What this project's records still lack5 things
  • A case worked by hand from the source's equation for both methods.
  • The equation for both methods.
  • The constants with their sources for both methods.
  • A case set linked to this version for both methods.
  • A record of what was not checked for both methods.
Changes to its methods0 changes

No change is logged for these method versions.