Applications & Mathematical Modeling

model fitting and validation

Writing down a differential-equation model is only half the job; the model contains unknown numbers — a growth rate, a transmission rate, a drug-clearance constant — and it claims to describe a real system. Fitting is the act of choosing those numbers so the model matches the data you actually observed. Validation is the harder, more honest act of asking whether the fitted model truly captures reality, or merely echoes the very data it was tuned on. Together they are how a model earns the right to be trusted.

Fitting works by minimizing disagreement. You pick the parameters that make the model's predicted curve come as close as possible to the measured points — most commonly by least squares, choosing the parameters that minimize the sum of squared gaps between prediction and data. For a differential equation you solve it (often numerically) for trial parameter values, compare with the data, and adjust until the fit is as tight as it can be. The result is a calibrated model with specific numbers in place of the symbols.

Validation is where intellectual honesty lives, because a model can fit beautifully and still be worthless. The cardinal sin is judging a model only by how well it matches the data used to fit it — given enough free parameters you can fit almost anything, including noise. The remedy is to test the model on FRESH data it never saw: hold some observations back, fit on the rest, then check the predictions against the held-out set. A model that predicts data it was not trained on has genuinely captured something; one that only fits its training data may have just memorized it (overfitting).

Keep two truths front of mind. First, a good fit is necessary but not sufficient: matching past data does not guarantee future prediction, and a more complex model almost always fits better while often generalizing worse. Second, parameters extracted by fitting carry uncertainty — the data could be consistent with a range of values — so an honest model reports not just a best number but how well it is pinned down. Fitting answers 'which parameters?'; validation answers the question that matters, 'should I believe this model at all?'.

Fit a logistic growth model to a country's early epidemic case counts and it nails the curve perfectly. But to validate it, hold back the last two weeks of data, fit only on the earlier weeks, and see if it predicts those two weeks. If it does, you have a real model; if the fit-everything version predicts wildly off, it was overfitting noise.

Fit on part of the data, test the prediction on the part held back — that is validation.

A model that fits its own training data perfectly may be worthless: with enough free parameters you can fit noise itself. The real test is prediction on data the model never saw — a good fit is necessary but never sufficient, and added complexity usually fits better while generalizing worse.

Also called
parameter estimation and testingcalibration and validation參數估計與檢驗校準與驗證