visual3d:documentation:pipeline:expressions:least_squares_fitting_of_data
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:documentation:pipeline:expressions:least_squares_fitting_of_data [2024/07/03 17:39] – created sgranger | visual3d:documentation:pipeline:expressions:least_squares_fitting_of_data [2025/01/24 18:53] (current) – [Best Fit Plane] wikisysop | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Least_Squares_Fitting_of_Data ====== | + | ===== Least Squares Fitting of Data ===== |
- | This page contains a list of all functions that are used to find a line or plane of best fit to your data. | + | This page contains a list of all of [[visual3d: |
==== Best Fit Plane ==== | ==== Best Fit Plane ==== | ||
- | **Best_Fit_Plane**(signal, | + | **Best_Fit_Plane**(signal, |
- | [[[https:// | + | The general form of the equation of a plane in 3D is ax+by+cz+d = 0 where 𝑎, 𝑏, and 𝑐 are the components |
- | Example: Compute a Best_Plane_Fit for one signal across a range of frames | + | |
- | **Evaluate_Expression** | + | If (𝑥0, |
+ | |||
+ | The result of the Best_Fit_Plane function is a signal with the fource components (a,b,c,d) | ||
+ | |||
+ | < | ||
+ | ! Example: Compute a Best_Plane_Fit for one signal across a range of frames | ||
+ | Evaluate_Expression | ||
/ | / | ||
/ | / | ||
Line 18: | Line 24: | ||
/ | / | ||
/ | / | ||
- | **;** | + | ; |
- | Example: Compute a Best_Plane_Fit for multiple signals at each frame of data | + | </ |
- | **Evaluate_Expression** | + | |
+ | < | ||
+ | ! Example: Compute a Best_Plane_Fit for multiple signals at each frame of data | ||
+ | Evaluate_Expression | ||
/ | / | ||
/ | / | ||
Line 29: | Line 38: | ||
/ | / | ||
/ | / | ||
- | **;** | + | ; |
- | ==== Best Fit Circle ==== | + | </ |
- | **Best_Fit_Circle**(signal, | + | ==== Best Fit Circle ==== |
- | Fit a 2D circle to the path of a signal. | + | **Best_Fit_Circle**(signal, |
- | The algorithm computes a best fit plane to the data, rotates this plane into a principal plane, computes the center and radius, the rotates these values back into the original plane. | + | |
- | The result is 4 components; the X,Y,Z location of the origin and the radius. | + | |
- | \\ | + | |
+ | The algorithm computes a best fit plane to the data, rotates this plane into a principal plane, computes the center and radius, the rotates these values back into the original plane. The result is 4 components: | ||
+ | - the origin' | ||
+ | - the origin' | ||
+ | - the origin' | ||
+ | - the radius. | ||
==== Best Fit Sphere ==== | ==== Best Fit Sphere ==== | ||
- | **Best_Fit_Sphere**(signal, | + | **Best_Fit_Sphere**(signal, |
- | Example : Fit a sphere to 6 points on a DIAMOND | + | < |
- | Create 6 TARGETS representing the Vertices | + | ! Example : Fit a sphere to 6 points on a DIAMOND |
- | [[Visual3D: | + | ! Create 6 TARGETS representing the Vertices |
+ | Create_Target | ||
/ | / | ||
! / | ! / | ||
/ | / | ||
! / | ! / | ||
- | **;** | + | ; |
- | [[Visual3D: | + | |
+ | Create_Target | ||
/ | / | ||
! / | ! / | ||
/ | / | ||
! / | ! / | ||
- | **;** | + | ; |
- | [[Visual3D: | + | |
+ | Create_Target | ||
/ | / | ||
! / | ! / | ||
/ | / | ||
! / | ! / | ||
- | **;** | + | ; |
- | [[Visual3D: | + | |
+ | Create_Target | ||
/ | / | ||
! / | ! / | ||
/ | / | ||
! / | ! / | ||
- | **;** | + | ; |
- | [[Visual3D: | + | |
+ | Create_Target | ||
/ | / | ||
! / | ! / | ||
/ | / | ||
! / | ! / | ||
- | **;** | + | ; |
- | [[Visual3D: | + | |
+ | Create_Target | ||
/ | / | ||
! / | ! / | ||
/ | / | ||
! / | ! / | ||
- | **;** | + | ; |
- | **Evaluate_Expression** | + | |
+ | Evaluate_Expression | ||
/ | / | ||
/ | / | ||
Line 92: | Line 110: | ||
/ | / | ||
! / | ! / | ||
- | **;** | + | ; |
- | Note that TARGETS are created and the sphere computed has each TARGET on its surface. {{Sphere1.jpg}}{{sphere6view.jpg}} | + | </ |
- | Example : Create a TARGET where each frame is on a random location on the surface of a sphere of radius 1 | + | Note that TARGETS are created and the sphere computed has each TARGET on its surface. |
- | **Evaluate_Expression** | + | |
+ | {{: | ||
+ | |||
+ | < | ||
+ | ! Example : Create a TARGET where each frame is on a random location on the surface of a sphere of radius 1 | ||
+ | Evaluate_Expression | ||
/ | / | ||
/ | / | ||
Line 102: | Line 125: | ||
/ | / | ||
! / | ! / | ||
- | **;** | + | ; |
- | **Evaluate_Expression** | + | |
+ | Evaluate_Expression | ||
/ | / | ||
/ | / | ||
Line 109: | Line 133: | ||
/ | / | ||
! / | ! / | ||
- | **;** | + | ; |
- | [[Visual3D: | + | |
+ | Create_Target | ||
/ | / | ||
! / | ! / | ||
Line 118: | Line 143: | ||
SIN(DERIVED:: | SIN(DERIVED:: | ||
! / | ! / | ||
- | **;** | + | ; |
- | **Evaluate_Expression** | + | |
+ | Evaluate_Expression | ||
/ | / | ||
/ | / | ||
Line 128: | Line 154: | ||
/ | / | ||
! / | ! / | ||
- | **;** | + | ; |
- | {{random8view.jpg}} | + | </ |
- | {{sphereRandom.jpg}} | + | |
+ | {{:random8view.jpg}} | ||
+ | {{:sphereRandom.jpg}} | ||
==== Simple Linear Regression ==== | ==== Simple Linear Regression ==== | ||
- | **Simple_Linear_Regression**(signal1, | + | **Simple_Linear_Regression**(signal1, |
- | Signal2 | + | < |
- | An explanation of the calculation can be found [[Visual3D: | + | Signal |
- | Signal1 and Signal2 are one component signals | + | </code> |
- | Resulting METRIC signal contains 6 components | + | |
- | Slope = m -> Component 1 | + | |
- | Intercept = b -> Component 2 | + | |
- | Siga = uncertainty in m -> Component 3 | + | |
- | Sigb = uncertainty in b -> Component 4 | + | |
- | Chi2 = chi square -> Component 5 | + | |
- | Q = The R^2 statistic -> Component 6 | + | |
+ | An explanation of the calculation can be found [[Visual3D: | ||
+ | Signal1 and Signal2 are both one-component signals and the resulting METRIC contains 6 components: | ||
+ | - Slope = m -> Component 1 | ||
+ | - Intercept = b -> Component 2 | ||
+ | - Siga = uncertainty in m -> Component 3 | ||
+ | - Sigb = uncertainty in b -> Component 4 | ||
+ | - Chi2 = chi square -> Component 5 | ||
+ | - Q = The R^2 statistic -> Component 6 |
visual3d/documentation/pipeline/expressions/least_squares_fitting_of_data.1720028397.txt.gz · Last modified: 2024/07/03 17:39 by sgranger