Linear Interpolation

Hi Guys,

I realized that we don’t have a Linear interpolation node in KNIME. So, I made a simple one using a python inside a Component.

  1. Just connect your dataset.

  2. Select the columns you want to interpolate and the number of interpolations:

and Voila…!

NOTE: You can also see what happened with your data for verification:

Attached is the workflow.



Also with minal changes in teh code you can also apply other interpolations such as:

Type of Interpolation Function Name
Polynomial Interpolation BarycentricInterpolator
Polynomial Interpolation KroghInterpolator
Univariate Spline Interpolation UnivariateSpline
Interpolated Univariate Spline InterpolatedUnivariateSpline
Least Squares Univariate Spline Interpolation LSQUnivariateSpline
Cubic Spline Interpolation CubicSpline
Rational Function Interpolation RationalFunctionInterpolator
Piecewise Polynomial (PCHIP) PchipInterpolator
Akima Interpolation Akima1DInterpolator
Bivariate Spline for 2-D Data RectBivariateSpline
Radial Basis Function Interpolation Rbf
Nearest Neighbor Interpolation NearestNDInterpolator
Multivariate Data Interpolation griddata

Linear Interpolation.knwf (117.4 KB)


Nice tool. Thanks for sharing.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.