Statistical Methods

Record endpoint conditions for a cubic spline

Define the task

A cubic spline interpolates the supplied coordinates while imposing smoothness between intervals. The endpoint conditions help determine its shape. Preserve the coordinate units, ordering and duplicate-handling rule before fitting. Distinguish an interpolating spline from a smoothing fit that intentionally need not pass through every observation.

Carry out the check

State whether endpoints use natural conditions, specified first derivatives, periodicity or the default not-a-knot rule. Natural conditions set the second derivative to zero at the endpoints. They do not mean the underlying process is linear beyond the data. Check the fitted curve near both ends and state how evaluation outside the observed domain is handled.

Worked hypothetical example

For a hypothetical straight line y=2x+1 observed at x=0,1,2, the values are 1,3,5. Endpoint slopes of 2 are consistent with that line and give y=2 at x=0.5. For curved observations, changing endpoint assumptions can alter values near the boundaries. Use a synthetic function with known behavior as a reference check, then report which boundary information is scientifically supported.

Method checked 14 November 2026 against SciPy documentation: CubicSpline.

Related reading

Reading path: Analyze data. Guide 139 of 142. Choose any guide to suit your project.

Statistical Methods

Document Spline Knots and Reuse the Fitted Basis

Preserve spline construction so predictions use the same transformation as the fitted model.

Statistical Methods

Inspect the boundary of a scalar optimization result

Constrain a scalar search and inspect whether the solution reaches a boundary.

Browse this reading pathTools for this stageGuides and downloads for this stage