Skip to content

tk-yoshimura/PadeInterpolation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PadeInterpolation

Define

Padé interpolation is the best rational function that minimizes that the squared distance to multiple points.

When the explanatory and objective variables are x and y,
a rational function with maximum coefficients m and n in the numerator and denominator is defined by the following equation:

pade define

The error for a single point is defined by the following equation:

pade error

The weighted squared error for multiple points is given by the following equation in the definition.
If it is not weighted, it can be interpreted as if all w were 1.

pade error sum

Solve

The parameter that minimizes the error is the point at which the partial derivative of each parameter is 0.
Fortunately, it can be solved as a linear problem.

pade partial p0
pade partial pk
pade partial qk

The matrix representation is as follows. Note that the matrix is symmetric.

When the y-intercept is not fixed:
pade matrix with intercept

When the y-intercept(p0=a) is fixed:
pade matrix without intercept

Result

fitting benchmark

With L2Norm Cost

pade error sum with cost
pade matrix with intercept, cost

Implement

See below for an example implementation.
Since this is a calculation that produces many digit loss, the double precision does not produce the expected results.
MultiPrecisionCurveFitting

See Also

PadeApproximation