多维网格反插值多维、网格、插值

2023-09-08 10:42:09 作者:心茧

我的工作插值样本数据{(x_i,y_i)}其中的x_i输入域位于四维空间和输出y_i定位在3D空间中的一个项目。我需要产生两个查找表的两个方向。我设法产生4D - > 3D表。但3D - > 4D是一个棘手。样本数据不在规则栅格点,并且它不是一对一的映射。是否有任何已知的方法来治疗这种情况呢?我做了一些网上搜索,但我发现的是只针对3D - > 3D地图,这是不适合这种情况。谢谢!

要回答Spektre的问题:

X(3D) - > Y(4D)的情况下,1X - >纽约

我要生成一个表,对于任何给定的X,我们可以找到Y的样本数据不会占用X的所有域的价值,但它是很好,我们只需要样品域内精度点数据。例如,我们有像样本数据{(X1,X2,X3) - >(Y1,Y2,Y3,Y4)}。这是可能我们还样本数据{(X1,X2,X3) - >(y1_1,y2_1,y3_1,y4_1)}。但它是确定。我们需要为任何(一个,B,C)在空间X中,它对应于一(E,F,G,H)中的表空间Y.可能有一个以上的选择,但我们只需要一个。 (对不起,混淆符号如果有的话)

应对了一种可能:因为我已经建立了流畅的映射从Y-> X,我可以用牛顿的方法或任何其他方法来扭转搜索点y的任何给定的x。但它是不够准确,且耗时的。因为我需要做的搜索表中的每个点,且误差模型误差与搜索错误的总和。

所以,我想知道这是可能直接找到映射进行插值,而不是在3做这样的搜索的样本数据。

解决方案

您正在寻找的预测/映射

你提到你有投影X(3D) - > Y(4D) 这不是一对一的,你的情况 就这样什么情况下(1× - > n个Y)或(的N× - > 1 Y)或?(的N× - > M Y) 双雷达反演台风外围强带状回波风场结构特征研究

您要使用的查找表

我以为你只是想生成所有的X为给定的是 在与非(1:1)映射的问题是,你可以用查找表 仅当它有 在所有有效点 或映射具有一定的几何或数学symetry (例如,在X和点之间的距离Y空间是类似的,并且映射是连续的) 您不能通用的映射点之间的插值 这样的问题是什么样的映射/投影,你有什么想法?

首先,1-> 1个/映射插值

如果您的X->Ÿ投影映射适用于插

然后3D-> 4D使用三线插入 找到最接近8点(每个在其轴形成的网格立方体) 以及它们之间的所有4个维度进行插值

如果你的X< -Y投影映射适用于插

然后4D-> 3D使用夸线性插入 找到最接近的16分(各在其轴形成的网格立方体) 及它们之间在所有3个维度进行插值

现在怎么样1-> n或N->米投影/映射

这完全取决于投影/映射属性,我什么都不知道。 尝试提供你的数据集的例子 的加入一些图像将是最好的

1×LT; - n个Y

我仍然会用夸线性插值

您仍然需要搜索你的Y工作台

但如果你组像4D格,那么它应该是很容易

找到16 Y台最近点到你输入Ÿ点

在这些点应该是最近点到你的Y所有轴系各+/-方向 在3D,它看起来是这样的: 红点是你输入Ÿ点 蓝点是找到最近点(网格) 在他们并不需要如此对称的图像 在不希望我画4D例如有意义的:)

插入

找到coresponding x指向 如果有更多的则每一点一点选择了更接近一到别人...... 现在,你应该有16×分和16 + 1 Y点 从Ÿ点,你只需要来计算你的输入Ÿ点沿线的距离 在这些距离作为参数的线性插值 他们归为< 0.1> 0的意思是左,1表示右一点 0.5表示正中间 您将需要在每个Y域层面的这种标距离 现在,只是计算沿直线插补所有的X点 ,直到你得到coresponding红点的X域 使用三线性插值(3D)有4 + 2 + 1 = 7的线性内插(作为图像) 为夸线性插补(4D)有8 + 4 + 2 + 1 = 15线性插值

线性插值

X = X0 +(X1-X0)* T X的插入点 X0,X1是在左,右点 t是距离参数< 0.1>

I am working on a project of interpolating sample data {(x_i,y_i)} where the input domain for x_i locates in 4D space and output y_i locates in 3D space. I need generate two look up tables for both directions. I managed to generate the 4D -> 3D table. But the 3D -> 4D one is tricky. The sample data are not on regular grid points, and it is not one to one mapping. Is there any known method to treat this situation? I did some search online, but what I found is only for 3D -> 3D mapping, which are not suitable for this case. Thank you!

To answer the questions of Spektre:

X(3D) -> Y(4D) is the case 1X -> nY

I want to generate a table that for any given X, we can find the value for Y. The sample data is not occupy all the domain of X. But it's fine, we only need accuracy for point inside the domain of sample data. For example, we have sample data like {(x1,x2,x3) ->(y1,y2,y3,y4)}. It is possible we also have a sample data {(x1,x2,x3) -> (y1_1,y2_1,y3_1,y4_1)}. But it is OK. We need a table for any (a,b,c) in space X, it corresponds to ONE (e,f,g,h) in space Y. There might be more than one choice, but we only need one. (Sorry for the symbol confusing if any)

One possible way to deal with this: Since I have already established a smooth mapping from Y->X, I can use Newton's method or any other method to reverse search the point y for any given x. But it is not accurate enough, and time consuming. Because I need do search for each point in the table, and the error is the sum of the model error with the search error.

So I want to know it is possible to find a mapping directly to interpolate the sample data instead of doing such kind of search in 3.

解决方案

You are looking for projections/mappings

as you mentioned you have projection X(3D) -> Y(4D) which is not one to one in your case so what case it is (1 X -> n Y) or (n X -> 1 Y) or (n X -> m Y) ?

you want to use look-up table

I assume you just want to generate all X for given Y the problem with non (1 to 1) mappings is that you can use lookup table only if it has all valid points or mapping has some geometric or mathematic symetry (for example distance between points in X and Y space is similar,and mapping is continuous) you can not interpolate between generic mapped points so the question is what kind of mapping/projection you have in mind?

First the 1->1 projections/mappings interpolation

if your X->Y projection mapping is suitable for interpolation

then for 3D->4D use tri-linear interpolation find closest 8 points (each in its axis to form grid hypercube) and interpolate between them in all 4 dimensions

if your X<-Y projection mapping is suitable for interpolation

then for 4D->3D use quatro-linear interpolation find closest 16 points (each in its axis to form grid hypercube) and interpolate between them in all 3 dimensions

Now what about 1->n or n->m projections/mappings

that solely depends on the projection/mapping properties which I know nothing of. try to provide an example of your datasets an adding some image would be best

[edit1] 1 X <- n Y

I still would use quatro-linear interpolation

you still will need to search your Y table

but if you group it like 4D grid then it should be easy enough

find 16 closest points in Y-table to your input Y point

these points should be the closest points to your Y in each +/- direction of all axises in 3D it looks like this: red point is your input Y point blue points are the found closest points (grid) they do not need to be so symetric as on image do not want me to draw 4D example that make sense :)

interpolation

find coresponding X points if there is more then one per point chose the closer one to the others ... now you should have 16 X points and 16+1 Y points from Y points you need just to calculate the distance along lines from your input Y point these distances are used as parameter for linear interpolations normalize them to <0,1> 0 means 'left' and 1 means 'right' point 0.5 means exact middle you will need this scalar distance in each of Y-domain dimension now just compute all the X points along the linear interpolations until you get the coresponding red point in X-domain with tri-linear interpolation (3D) there are 4+2+1=7 linear interpolations (as on image) for quatro-linear interpolation (4D) there are 8+4+2+1=15 linear interpolations

linear interpolation

X = X0 + (X1-X0)*t X is interpolated point X0,X1 are the 'left','right' points t is the distance parameter <0,1>