问题描述
对于二维数据曲线拟合的问题是众所周知的(LOWESS等),但给出一组三维数据点,我怎么适合3D曲线(如:平滑/回归样条),以这个数据?
The curve-fitting problem for 2D data is well known (LOWESS, etc.) but given a set of 3D data points, how do I fit a 3D curve (eg. a smoothing/regression spline) to this data?
更多:我试图找到一条曲线,装修用向量X,Y,Z它们没有已知的关系提供的数据。从本质上讲,我有一个三维点云,并需要找到一个3D的趋势线。
MORE: I'm trying to find a curve, fitting the data provided by vectors X,Y,Z which have no known relation. Essentially, I have a 3D point cloud, and need to find a 3D trendline.
更多:我的含糊道歉。我试了几种方法(我还没有尝试过修改线性拟合)和随机NN似乎制定出最好的。也就是说,我随机选择的点云的点,找到它的邻国的心(内任意球),迭代。连接重心,形成光滑样条线已经被证明是困难的,但获得的重心还说得过去。
MORE: I apologize for the ambiguity. I tried several approaches (I still haven't tried modifying the linear fit) and a random NN seems to work out best. I.e., I randomly pick a point from the point cloud, find the centroid of it's neighbors (within an arbitrary sphere), iterate. Connecting the centroids to form a smooth spline is proving to be difficult but the centroids obtained is passable.
要弄清这个问题,数据不是一个时间序列,我正在寻找一个平滑的样条曲线最能说明点云也就是说,如果我是项目的任何2个变量构成的平面这款3D样条曲线中,预计花键(到2D)将投影点云的平滑贴合(到2D)。
To clarify the problem, the data is not a time series and I'm looking for a smooth spline which best describes the point cloud I.e., if I were to project this 3D spline on a plane formed by any 2 variables, the projected spline (onto 2D) will be a smooth fit of the projected point cloud (onto 2D).
IMG:我已经包含一个图像。红色点重新present从上述方法获得的质心。
IMG: I've included an image. The red points represent the centroid obtained from the aforementioned method.
推荐答案
您可以尝试添加剂(即单指数模型),因为GAM http://www-stat.stanford.edu/software/gam/index.html
You could try additive (i.e single index models), as GAMhttp://www-stat.stanford.edu/software/gam/index.html
这是一个贪婪的方法,可伸缩性非常大,在一些R封装以及实施
it's a greedy approach, very scalable, well implemented in several R packages
这篇关于曲线拟合3D数据集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!