Least Squares fit in plain english

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Least Squares fit in plain english

    Can someone provide me with the solve importer and explain me in plain English how does it works. I need to know all the equations and the logic behind them. Thanks
    Last edited by gdntnovice; 04-26-2020, 12:26 AM.

  • #2
    Maybe I'm not the best at explaining something in English... but I can try.
    You have to consider each hit as an assembly of coordinates theo, actual, and vector (essentially theo).
    Fitting data uses different ways (least square, least square vector, minmax and minmax vector).
    Each of them minimizes a sum calculated from deviations.

    Least square deviation is the distance between measured coordinates and theo ones.
    least square fit calculates the minimum of the squared sum of those deviations.

    Least square vector deviation is the distance between measured coordinates and theo ones projected along the vector theo.
    least square vector fit calculates the minimum of the squared sum of those deviations.

    Minmax fit deviation is the same than LS deviation, but the algorithm searches minimizing the difference between the max deviation and the min deviation.

    Minmax vector is the same, but with projected deviations.

    Hope it's clear enough...

    Comment


    • #3
      gdntnovice :what kind of line is it ? do you have an equation of it ?

      Comment


      • #4
        You can try this :
        test ligne.zip

        (values are calculated with LS vector, line along X, 21 hits, deviation along z)

        Comment


        • #5
          Yep...
          Z=ax+b is the equation of a line in the Y plane. "a" is the slope, b is the coordinate along z where the line cuts the Z axis.
          With this equation, you can calculate for each x value the optimized z, and then calculate the deviation between actual z and optimized line.
          Hope it's clear...
          If someone here could translate it in a right english, it would be nice...

          Comment


          • #6
            The equation of a line is y = mx + b, where m is the slope and b is the y-intercept (the value of y when x = 0 / the point on the y-axis that the line intersects). When you have several points that don't fall on any particular line (imagine a triangle as your three data points) there is a mathematical way to "fit" a line to the data points.

            A least squares fit will find a particular set of values for m and b such that the "squares of the deviations" are minimized. So, the equation of a line is found such that when you put your inputs into the equation, an "estimated" value of y is produced. That estimated value is then compared to the actual value of y measured by finding the difference (y - y`).

            The procedure for generating the line is such that it minimizes the square values of these differences (y - y`)^2 over all data points.

            Comment


            • JEFMAN
              JEFMAN commented
              Editing a comment
              Thx ! There's a big difference between writing what I think, and reading what is wrote by a native...

          Related Topics

          Collapse

          Working...
          X