Polynomials, interpolation, and the output domain
Three distinct concepts: the polynomial degree sets the flexibility of the model, the output domain sets where the function is evaluated, and PCHIP interpolation passes exactly through the nodes. Let us look at them in the actual GUI.
Verified interface: GX-TXT DEV112-P011 · Dataset Curve Fit.
Three different scientific decisions
A common mistake is to confuse the number of points drawn in the plot with the number of observations used in the fit. In Curve Fitter these quantities are kept separate. The choice of model and degree defines the function to fit; Fit points defines the set of observations used in the estimate; Output domain defines the coordinates at which the result is calculated for display and any export.
Our experiment uses a Dataset entirely synthetic, with 13 numerical pairs, time from 0 to 12 s and the response in volts. The observations come from a quadratic function with small deterministic deviations, not from laboratory measurements.
U(t) = 0.42 V + (0.06 V/s) · t + (0.014 V/s²) · t² + ε(t).
The same c08_polynomial_domain source is used for all runs, so that differences between Datasets do not distort the comparison.
Start with a degree-2 polynomial
Open Curve Fitter from the Viewers tab, select the Dataset, choose X = Time (s) and Y = Voltage (V), then use Add Dataset curve. In the Fit model and configuration section set Model = polynomial, Degree = 2, Fit points = all and Output domain = source. Finally press Preview fit.
source domain generates 13 output points at the X coordinates of the source.For this Dataset the degree-2 regression gives RMSE = 0.011253 V. The result is consistent with the law used to generate the values, but it is no general guarantee that quadratic models are good.
Output domain: source and range
The Output domain control provides the source and range options for functional fitting. With source, the fitted function is evaluated at the distinct X values of the source; with range, you can define a range and the number of points that describe the result.
To obtain a more densely sampled curve, change the selector to range and fill X min = 0, X max = 12 and Samples = 51.
The change invalidates the previous Preview because it changes the requested result. Press Preview fit again: GX-TXT now produces 51 output points, but it still uses the same 13 training observations. Slope, intercept, quadratic coefficient and RMSE of the regression stay the same.
Extrapolation: evaluate the function outside the observed range
Set X min = −2, X max = 14 and Samples = 81, keeping the degree-2 polynomial. The data used to estimate the model only cover the 0–12 s range. The extended domain therefore contains parts not supported by observations.
In the P011 Preview, samples within the original range stay green, while the extrapolated portions are shown as dashed orange. The information is also present in the numerical result through a flag attached to each sample.
A polynomial can return a value outside the measured range, but this mathematical possibility does not guarantee a physically valid prediction. The further you move from the data, the more important it is to know the physical model and the boundary conditions. Extrapolation is not a new measurement.
P011 results may include an automatic shift of the X axis used for the calculation. In that representation the internal numerical coefficients can differ while describing the same physical function. In the test the predictions at the same thirteen X values were identical within numerical precision. To interpret the parameters, also read the physical formula and any offset, and avoid comparing coefficients expressed in different bases directly.
The polynomial degree should not grow automatically
To see the effect of model complexity, go back to Output domain = source and set Degree = 5. After requesting a new Preview, Curve Fitter estimates six coefficients from thirteen observations.
| Model | Free parameters | RMSE on the 13 data points (V) |
|---|---|---|
| Polynomial, degree 2 | 3 | 0.0112534 |
| Polynomial, degree 5 | 6 | 0.00889156 |
Degree 5 reduces the error on the training data, but this does not show that it better describes the process that generated them: the known synthetic law is quadratic. The risk of also fitting small perturbations grows with the number of parameters. Choosing a high degree requires a scientific reason and, where appropriate, validation with observations not used in the estimate.
PCHIP: interpolation, not global polynomial regression
The Model selector also includes pchip, a piecewise cubic interpolation designed to preserve the shape of the data. It does not produce a single global polynomial of degree 3 or 5: it builds local pieces that pass through the nodes.
In the Viewer choose Model = pchip and Output domain = source, then request a Preview. In the example, all 13 nodes are crossed exactly. An independent check of the original coordinates and the curve values gives a maximum error at the nodes of zero, to the precision of the test.
For the PCHIP of this example, the Preview returns RMSE = 0 on the nodes and the train_r2 numerical field is NaN. This should not automatically be read as an R² of zero or as a failed calculation: it is a point of the Viewer’s statistical semantics that needs to be checked separately.
If you want to estimate the global parameters of a physical law, interpolation does not replace regression. If instead the goal is to reconstruct a continuous trend between discrete observations, an interpolator can be appropriate. For a real scientific case you still need to check monotonicity, repeated points, extremes and domain limits.
What to check before accepting the result
To interpret the results, always check four things: how many original points took part in the calculation, how many points were generated for output, whether part of that output falls outside the observed domain, and whether the method is a regression or an interpolation.
In the example we kept these elements clearly apart: degree 2 with 13, 51 and 81 output samples; degree 5 with 13 source points; and PCHIP passing through all nodes. The results were compared with independent numerical methods, but the tests do not automatically cover other degrees or the interpolation variants in the menu.
No Preview was accepted or published as a Dataset. The next chapter covers exponential, Gaussian and power-law models, with the initial parameters and validity criteria specific to those functions.






