Open gregorykimmel opened 3 years ago
This might be possible if you sorted x
and gave each column as a distinct element of the tuple. I'm assuming x
represents a 5D space?
Is this the only way? We could sort by a particular column, but in general the other columns would not be sorted as well. A sample of the actual x
0.8 1.3 0.5 0.6 0.5
1.2 1.0 -0.4 0.4 0.4
0.6 0.7 -0.5 0.1 -0.1
0.2 0.9 1.1 0.1 0.1
1.5 2.1 1.3 3.1 0.2
1.9 -0.1 0.3 1.1 1.8
0.9 0.0 0.0 0.0 0.8
1.1 1.3 -0.8 0.2 0.3
with y
0.346573590279973
0.277258872223978
0.154032706791099
0.198042051588556
0.346573590279973
0.693147180559945
0.462098120373297
0.346573590279973
I am getting the impression that interpolation is difficult to do in this setting, but I am wondering why this package in R seems to be able to do it https://cran.r-project.org/web/packages/chebpol/chebpol.pdf. In particular the part on scattered data.
I'm still rather confused exactly how you want to process x. Each row is a vector? (Julia is column major, so vectors are usually columns). Then you have some mapping from the vectors to a single value. How do we interdigitate over the vectors? What is the metric of the vector space? Or is this some sparse sampling of a space?
There are a few other packages that handle Chebyshev polynomials, although I'm not really sure where they are with multidimensional capabilities. https://github.com/JuliaApproximation/ApproxFun.jl https://juliamath.github.io/Polynomials.jl/dev/polynomials/chebyshev/
Could you give me some example calculations? How would you compute itp(0.1,0.3,0.01,-0.4,0.5)
with your example x and y?
Perhaps this will also be useful in regards to the R package in terms of the functionality I'm hoping to use in Julia: https://cran.r-project.org/web/packages/chebpol/vignettes/chebpol.pdf. In particular the last few pages (beginning at the end of page 7) discusses the two solvers available for scattered data describes an example.
Using Interpolations
Is there any way to do this? I would like to end up with a function
itp
that can take numbers from the matrixx
e.g. itp(0.1,0.3,0.01,-0.4,0.5) and return a value that resulted from the interpolation (assuming that vector was not a row in the datax
)