Fit points to a plane algorithms, how to iterpret results?

后端 未结 2 1882
臣服心动
臣服心动 2020-12-31 16:57

Update: I have modified the Optimize and Eigen and Solve methods to reflect changes. All now return the \"same\" vector allowing for machine precision.

相关标签:
2条回答
  • 2020-12-31 17:20

    The normal vector of the plane in Eigen solution is the eigenvector for smallest eigenvalue. Some Eigen implementations sort the eigenvalues and eigenvectors some others don't. So in some implementations it's sufficient to take first (or last) eigenvector for normal. In other implementations you have to sort them first. On the other hand the majority of SVD implementations provide sorted values so it's simple first (or last) vector.

    0 讨论(0)
  • 2020-12-31 17:37

    Optimize

    The normal vector of a plane a*x + b*y +c*z = 0, equals (a,b,c)

    The optimize method finds a values for a and b such that a*x+b*y~z (~ denotes approximates) It omits to use the value of c in the calculation at all. I don't have numpy installed on this machine but I expect that changing the model to (a*x+b*y)/c should fix this method. It will not give the same result for all data-sets. This method will always assume a plane that goes through the origin.

    SVD and LTSQ

    produce the same results. (The difference is about the size of machine precision).

    Eigen

    The wrong eigenvector is chosen. The eigenvector corresponding to the greatest eigenvalue (lambda = 1.50) is x=[0, sqrt(2)/2, sqrt(2)/2] just as in the SVD and LTSQ.

    Solve

    I have no clue how this is supposed to work.

    0 讨论(0)
提交回复
热议问题