Icon

One & Two Dimensional interpolation example

There has been no title set for this workflow's metadata.

There has been no description set for this workflow's metadata.

In the Java snippet there are two additional Java libraries added from the SMILE github page (I think we only need one, the interpolation one!)The library can be downloaded at the following location:https://github.com/haifengl/smile/releasesDocumnetation/examples can be found here:https://haifengl.github.io/interpolation.htmlTable data is contained in JAVA snippet and points to be interpolated are contained in the table. Interpolated values can be seen on output of Java snippet.Interpolation methods available:BicubicInterpolation Bicubic interpolation in a two-dimensional regular grid.BilinearInterpolation Bilinear interpolation in a two-dimensional regular grid.CubicSplineInterpolation1D Cubic spline interpolation.CubicSplineInterpolation2D Cubic spline interpolation in a two-dimensional regular grid.KrigingInterpolation Kriging interpolation for the data points irregularly distributed in space.KrigingInterpolation1D Kriging interpolation for the data points irregularly distributed in space.KrigingInterpolation2D Kriging interpolation for the data points irregularly distributed in space.LaplaceInterpolation Laplace interpolation to restore missing or unmeasured values on a 2-dimensional evenly spaced regular grid.LinearInterpolation Piecewise linear interpolation.RBFInterpolation Radial basis function interpolation is a popular method for the data points are irregularly distributed in space.RBFInterpolation1D Radial basis function interpolation is a popular method for the data points are irregularly distributed in space.RBFInterpolation2D Radial basis function interpolation is a popular method for the data points are irregularly distributed in space.ShepardInterpolation Shepard interpolation is a special case of normalized radial basis function interpolation if the function φ(r) goes to infinity as r → 0, and is finite for r > 0.ShepardInterpolation1D Shepard interpolation is a special case of normalized radial basis function interpolation if the function φ(r) goes to infinity as r → 0, and is finite for r > 0.ShepardInterpolation2D Shepard interpolation is a special case of normalized radial basis function interpolation if the function φ(r) goes to infinity as r → 0, and is finite for r > 0.first create the data table, for example: double[] x1 = {1950.0, 1960, 1970, 1980, 1990}; double[] x2 = {10.0, 20, 30}; double[][] y1 = { {150.697, 199.592, 187.625}, {179.323, 195.072, 250.287}, {203.212, 179.092, 322.767}, {226.505, 153.706, 426.730}, {249.633, 120.281, 598.243} };the second dimension is the number of columns in the data list Then create the construction of the interpolation function using the SMILE library: var cubic = new smile.interpolation.CubicSplineInterpolation2D(x1, x2, y1);Then supply new x1 & x2 and invoke the interpolation routine to output to a column (c_column3 & c_column4 are dummy values created from the table, these values would otherwise come from raw datacolumns): data2_out = cubic.interpolate(c_column3, c_column4); Node 103Node 104 Java Snippet Table Creator In the Java snippet there are two additional Java libraries added from the SMILE github page (I think we only need one, the interpolation one!)The library can be downloaded at the following location:https://github.com/haifengl/smile/releasesDocumnetation/examples can be found here:https://haifengl.github.io/interpolation.htmlTable data is contained in JAVA snippet and points to be interpolated are contained in the table. Interpolated values can be seen on output of Java snippet.Interpolation methods available:BicubicInterpolation Bicubic interpolation in a two-dimensional regular grid.BilinearInterpolation Bilinear interpolation in a two-dimensional regular grid.CubicSplineInterpolation1D Cubic spline interpolation.CubicSplineInterpolation2D Cubic spline interpolation in a two-dimensional regular grid.KrigingInterpolation Kriging interpolation for the data points irregularly distributed in space.KrigingInterpolation1D Kriging interpolation for the data points irregularly distributed in space.KrigingInterpolation2D Kriging interpolation for the data points irregularly distributed in space.LaplaceInterpolation Laplace interpolation to restore missing or unmeasured values on a 2-dimensional evenly spaced regular grid.LinearInterpolation Piecewise linear interpolation.RBFInterpolation Radial basis function interpolation is a popular method for the data points are irregularly distributed in space.RBFInterpolation1D Radial basis function interpolation is a popular method for the data points are irregularly distributed in space.RBFInterpolation2D Radial basis function interpolation is a popular method for the data points are irregularly distributed in space.ShepardInterpolation Shepard interpolation is a special case of normalized radial basis function interpolation if the function φ(r) goes to infinity as r → 0, and is finite for r > 0.ShepardInterpolation1D Shepard interpolation is a special case of normalized radial basis function interpolation if the function φ(r) goes to infinity as r → 0, and is finite for r > 0.ShepardInterpolation2D Shepard interpolation is a special case of normalized radial basis function interpolation if the function φ(r) goes to infinity as r → 0, and is finite for r > 0.first create the data table, for example: double[] x1 = {1950.0, 1960, 1970, 1980, 1990}; double[] x2 = {10.0, 20, 30}; double[][] y1 = { {150.697, 199.592, 187.625}, {179.323, 195.072, 250.287}, {203.212, 179.092, 322.767}, {226.505, 153.706, 426.730}, {249.633, 120.281, 598.243} };the second dimension is the number of columns in the data list Then create the construction of the interpolation function using the SMILE library: var cubic = new smile.interpolation.CubicSplineInterpolation2D(x1, x2, y1);Then supply new x1 & x2 and invoke the interpolation routine to output to a column (c_column3 & c_column4 are dummy values created from the table, these values would otherwise come from raw datacolumns): data2_out = cubic.interpolate(c_column3, c_column4); Node 103Node 104 Java Snippet Table Creator

Nodes

Extensions

Links