Python Forum
Cubic spline Graph Interpretation how? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: Cubic spline Graph Interpretation how? (/thread-41959.html)



Cubic spline Graph Interpretation how? - GREEN369 - Apr-15-2024

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


RE: Cubic spline Graph Interpretation how? - Gribouillis - Apr-15-2024

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.