Python Forum

Full Version: Cubic spline Graph Interpretation how?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Friends,

i am new to python i want to calculate the r2 value for the cubic spline graph and how the results are intercepted from the graph based on the standard b/b0 and concentration values i am attaching a image file for your reference please any one can help me to rewrite the code logic for the calculation of cubic spline graph generation
the formula for cubic spline calculation is as below

The function S(x)∈C2[a,b], and it is a cubic polynomial on each cell [xj,xj+1], where a = x0 <x1<...< xn= b is a given node, then S(x) is called a cubic spline function on nodes x0, x1,...xn.If the function value Yj = f (Xj).( j =0, 1,, n) is given at the node x j, it is true S(xj) = yj .( j = 0, 1,, n), then S(x) is called a cubic spline interpolation function.
The actual calculation also needs to introduce boundary conditions to complete the calculation. The boundary usually has a natural boundary (the second derivative of the boundary point is 0) Clamping boundary (given by the derivative of boundary point), non-kinking boundary (make the third-order derivative of the two end points and the third-order of the adjacent points of the two end points) Lead equal).

thanks in advance

Green369
I think the scipy package has a specialized function scipy.interpolate.CubicSpline() that computes a cubic spline interpolation given a set of abscissas and corresponding set of ordinates. Look for example usage of this function.