最小二乘法拟合线在四维空间 [英] least square line fitting in 4D space

查看:905
本文介绍了最小二乘法拟合线在四维空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个点的集合,如:

I have a set of points like:

(X,Y,Z,t)的

(1,3,6,0.5)

(1 , 3 , 6 , 0.5)

(1.5,4,6.5,1)

(1.5 , 4 , 6.5 , 1)

(3.5,7,8,1.5)

(3.5 , 7 , 8 , 1.5)

(4,7.25,9,2)

(4 , 7.25 , 9 , 2)

我期待找到这些点的最佳线性拟合,让说像函数: F(T)=一* X + B * Y + C * Z

I am looking to find the best linear fit on these points, let say a function like: f(t) = a * x +b * y +c * z

推荐答案

看来你正在寻找一个点云的主轴线。

It seems that you are looking for the major axis of a point cloud.

您可以工作了这一点,通过寻找相关的最大特征值的协方差矩阵的特征向量。可能是一个机会,利用功率的方法(从心开始点最远的迭代,例如)。

You can work this out by finding the Eigenvector associated to the largest Eigenvalue of the covariance matrix. Could be an opportunity to use the power method (starting the iterations with the point farthest from the centroid, for example).

也可以通过奇异值分解,pferably使用计算方法$ P $最大的价值而已。

Can also be addressed by Singular Value Decomposition, preferably using methods that compute the largest values only.

如果您的数据集包含异常值,然后RANSAC可能是一个更好的选择:取两分随意和计算距离他们定义线的总和。重复的次数,并保持最合适的。

If your data set contains outliers, then RANSAC could be a better choice: take two points at random and compute the sum of distances to the line they define. Repeat a number of times and keep the best fit.

使用平方距离将回答您的要求最小二乘的,但非平方距离将更加强劲。

Using the squared distances will answer your request for least-squares, but non-squared distances will be more robust.

这篇关于最小二乘法拟合线在四维空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆