PPolySim OS

Curve Fitting

Fit a nonlinear model to noisy data and watch least squares converge. Choose an exponential, logistic, Gaussian, power, or sinusoid curve and see the parameters lock on.

Curve Fitting StudioLive

Controls

Fit a nonlinear model to noisy data. Gauss–Newton iterates from a starting guess, minimizing squared residuals. Watch the cyan curve snap onto the points.

Presets

▶ Run in Python

Data Inspector

ModelLogistic
Iteration0/9
RMSE (live)2.3195
0.9705
Iterations9

Fitted parameters

L (true 10)9.68
k (true 1.2)1.257
x0 (true 5)4.876

Fitted model

Gauss–Newton update

Reading this result: Nonlinear least squares has no closed-form solution like a straight-line fit — the logistic model is nonlinear in its parameters, so PolySim iterates with Gauss–Newton, linearizing the model at each step via the Jacobian. Here it converged in 9 iterations to R² = 0.971, a strong fit. Because it is iterative, the result depends on the starting guess: a poor initial guess can send it toward a bad local minimum or fail to converge.

Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.

or unlock everything with Pro →
★ Sign in to save this setup
Save your tuned setup, or drop this simulation into your own site, docs, or course page.

How it works

Unlike a straight-line or polynomial fit, a nonlinear model has no closed-form least-squares solution — it must be found by iteration. This studio runs Gauss–Newton with Levenberg–Marquardt damping: at each step it builds the residual vector, computes the Jacobian numerically, and solves the normal equations Δβ = (JᵀJ)⁻¹Jᵀr to update the parameters. Adjust the noise level and sample count, then watch the fitted curve snap onto the data over successive iterations. Because it is iterative, the final fit depends on the starting guess — the same reason real-world nonlinear regression can land in a bad local minimum.

Ask the AI about this model

The math, the assumptions, real-world uses, or a code translation — explained for this exact simulation.

More Numerical Methods simulations

Frequently asked questions

Is this curve fitting nonlinear model tool really free?
Yes. Curve Fitting runs entirely in your browser using your device's own compute, so local use is free forever. You only pay Compute Tokens if you scale a job to the cloud.
Do I need to install anything?
No. Everything runs client-side in a modern browser — no downloads, no license, no account required to start.
Can I save or share my simulation?
Create a free account to save projects, and use a shareable embed or minted DOI to publish a live, interactive version anywhere.
How accurate are the results?
The solver uses established numerical methods, but results are for research and educational purposes and should be validated against experiment or professional review before you rely on them.